Written by elevenlab employee

### 1. What is gradient descent

Gradient Descent (GD) is an optimization algorithm used for minimizing the cost function in Machine Learning and Deep Learning.

An easy way to understand: Gradient Descent is one of an algorithm to training your model in Machine Learning and Deep Learning.

As I said, Gradient Descent is an algorithm used for minimizing the cost function, so if we have cost function like this :

and we can define Gradient Descent like :

where j = 0 and j = 1

### 3. How Gradient Descent work

First, we initialization θj and assign θj into an algorithm to compute new θj and repeat until finding out θ so that cost function J(θj) is small enough.
Like this :