An equation that defines a straight line is referred as the equation of the line. Finding equation of a line is very simple. We can find the **equation of a line** for the following conditions:

- If the slope and y intercept is given
- If the slope and a point is given.
- If two points on the line are given.

- The slope-intercept form of a line is y= mx + b,

where m is the slope

b is the y-intercept.

** Example**

Find the equation of the line with slope -3 and y-intercept 5.

** Solution: ** m = -3 and b = 5

The general equation is y = mx + b

Substitute the values into equation, we get

y = -3x + 5

** Hence,the equation of the line is y = -3x +
5**

Check this topic **Slope of a Line Equation** it might be helpful to you for more help keep
reading my blogs.

**Example:**

Find the equation of a line if the slope is -2 and passes through (6, 8)

**Step 1**: Use the slope-intercept form of a line: y = mx + b

Given m = -2 Hence y = - 2x + b

**Step 2** : Substitute values into equation:

The y-intercept was not given. However, we are given the point, (6, 8). Thus x = 6 and y = 8

Substitute the values to find the y-intercept** b**

y = mx + b

8 = -2(6) + b

8 = -12 + b

18 = b

**Step 3**: Solution

Substituting the value of b, we get y = -2x + 18

** Hence,the equation of the line is ****y = -2x + 18**

**Example:**

Find the line that passes through (2, 4) and (6, 24)

**Steps:**

1) Use the two points to find the slope using **slope** formula

2) Use the slope and either one of the points to find the value the y-intercept.

**Step 1:**
Slope = (y_{2}– y_{1}) / (x_{2} – x_{1})

= (24– 4) / (6 – 2)

= 20/4 = 5

**Step 2** : Let’s choose the point (2,4)

y = mx + b

4 = 5(2) + b

4 = 10 + b

6 – 10 = b

-4 = b

Substituting the values in the general equation, we get

**
** y = -5x + 4

** Hence the equation of the line is y = - 5x + 4**