Finding the equation of a line is a fundamental part of elementary algebra. You are taught how to find the equation of a line in elementary school and beyond. Unfortunately, the equation of a line is only defined for lines that do not pass through any particular point or have zero slope.

Linear functions, or lines, are represented by an equation that includes the variables x and y, where x and y are any numbers. For example, the * linear function 2y − 3x* + 5 = 7 has variables y and x with values 2 and 3, respectively. The graph of this linear function is a line that passes through the points (2,3) and (5,7).

This article will discuss two more complicated cases: when the line passes through a point or has zero slope. We will *first discuss lines* that pass through (or terminate at) a specific point and then lines with zero slope.

## Slope formula

The slope of a line can be calculated by the difference between the x-coordinates and the y-coordinates divided by the difference in the x-coordinates.

So, if a line passes through (5, 1) and has a slope of , then:

This is read as “the slope of a line is negative one.” Since this equation represents a **vertical line**, it is not very useful in geometry. However, it can be used to determine other values on the graph.

The equation for a horizontal line with no slope is . This represents a line that *goes right* through (5, 1) with no change in y-value. Many lines can be described by this formula, making it very useful.

## Calculate the y-intercept

The y-intercept of a linear equation is the value where the line passes through the y-axis. To find the y-intercept, you need to solve for when b is 0.

So if you have the equation of a line, you can solve for what value it passes through on the y-axis by **simply taking** out the b. Pretty cool, right?

Here is an example: assume that the linear equation A=2x+b, where A is 2x+b, then b=0 and so A=2x. Thus, 2x+0=2x so x=0. The y-intercept of this line is 0!

This can be very useful when analyzing graphs on how **lines affect things** on the y-axis. You can see what *things change* when there is a change in the x-axis but not the y-axis.

## Find the x-coordinate of the point that has a y-coordinate of 1

The **next step** is to find the value of x when y *equals 1*. To do this, you need to solve for x where the *slope equals 0*.5, or -0.5 divided by 2 = x.

So if the line passed through (5, 1) and had a slope of -0.5, then the x-coordinate of the point that has a y-coordinate of 1 would be 2.

Try it yourself on a graph calculator or computer software to be sure! Once again, check your work with someone else’s to make sure you are both getting the same answer.

## Solve for b_{1} and b_{2}

Now that you have the *two points* on the line, you can solve for the slope of the line. The line passing through (5, 1) and with a slope of has a formula of .

To solve for the two b’s, take the difference of the y-values and divide by the difference of the x-values. Then, plug these values into b.

So, b_{1} = and b_{2} = . Now you have solved for both slopes!

Check out how these slopes look on the graph: The red line has a slope of , and the blue line has a slope of . Both are correct lines that pass through (5, 1) and have a slope of .

## Check to make sure the coordinates are in the correct order

The first step in finding the line equation is to put the coordinates in the correct order. The x-*coordinate goes first*, and the y-*coordinate goes second*.

If the line passes through (5, 1) and has a slope of , then you can write the equation as y = 1 – x .

Now that you have the line equation, you can use a calculator to find out what **point exactly matches** this line. Put in (5, 1) and you will get (4, 0). This means that point (4, 0) is on the line y = 1 – x .

You can *also use algebra* to find out if a point is on the line. Subtract the y-coordinate from the slope and then divide by the x-coordinate. If you did this for (4, 0), you would get (0 / 4) = false . This means (4, 0) is not on the line y = 1 – x .

## Find the slope using the formula m=\frac{y_2-y_1}{x_2-x_1}

The slope of a line can be found using the formula m=\frac{y_2-y_1}{x_2-x_1}. The slope represents how much the y-coordinate changes for every x-coordinate change.

So, if the line passes through the (5, 1) point and has a slope of , then it *would change* by on either side of the point (5, 1) .

The slope can be interpreted in **two ways**: how steep the line is, or what point on the line is parallel to some other point. For example, if you have a line that goes through (5, 1) and has a slope of , then somewhere between (5, 1) and another point there is another point that is parallel to (1, 0) .

## Write out the full equation of the line using b_{1}, b_{2, m, and (5, 1) as points on it}

The full equation of the line is b_{1} + m*b_{2} = (5, 1), where b_{1} is the y-intercept and b_{2} is the slope. Slope is just another way to say change in y/change in x, so b_{2} = 1 / 5, or 1 / (5 − 1).

Now that you have the full equation of the line, you can test any point on the line to see if it is part of the solution. You *could also find additional points* on the line to see if they are on it as well.

There are multiple ways to check whether a point is on a line, but one way is to do a cross product.

## Check your work by calculating another point on your line and making sure it is in order^{*}^{**}^{***}^{****}^{*****}end|title=What is an Equation for a Line?|url=https://www.khanacademy.org/math/geometry/lines-and-angles/lines/eqn-for-a-line/-GvXlZDg0E|work=Khana Academy|accessdate=14 December 2018}} —- === Points on a Line === {{main article|Points on a Line}} {{#widget:Html5media|url=https://www.youtube.com/watch?v=-GvXlZDg0E&feature=youtu.be&autoplay=1}} . . . * * * | |} ” /> == Linear equations == A linear equation relates an unknown number (or variable

An equation is a statement containing an equality relation. In math, an equality relation is defined as two expressions that are of the same value.

For example: 3 + 5 = 8 is an equation because 3 + 5 and 8 are of the same value (i.e., 10). These expressions may be numbers, variables, or any combination of the two.

Variables are symbols that represent any value (real or imaginary). There are four basic types of equations: equality, inequality, absolute value, and quadratic. All of these equations have one thing in common: they all contain a relation that is linear. Linear refers to a straight line.^{1}

Unknown numbers or variables in an equation are called unknowns.^{2} Unknowns can be either integral or differential.^{3} Integral unknowns are numbers (such as 2 or -5), while differential unknowns are variables (such as x or y). A variable cannot be both integral and differential at the same time.