Linear equation

In mathematics, or more specifically algebra, a linear equation is an equation that can be written so that each term is either a constant or the product of a constant with a variable. In other words, a linear equation equates polynomials of the first degree.

Linear equations are ubiquitous in applications of mathematics. Equations involving a single variable appear in the simplest problems where one unknown quantity needs to be determined from other given information. They can always be solved, and are the simplest equations to solve, requiring only the elementary operations of elementary arithmetic (addition, subtraction, multiplication, and division) and their properties.

Other types of equations (called non-linear equations) often cannot be solved exactly. Linear equations are important for finding approximate solutions when exact solutions cannot be obtained.

Linear equations in one variable
A linear equation in one variable can be put in the form $$ax + b = cx + d$$, where where x is the variable and at least one of a or c is nonzero. For example,


 * $$2x - 3 = -\frac{1}{3}(x+2) + 1 $$

is a linear equation. To see this, we simplify the right side until it becomes a linear polynomial:


 * $$-\frac{1}{3} (x+2) + 1 = -\frac{1}{3} x + \left( -\frac{1}{3} \right) 2 + 1

= -\frac{1}{3} x -\frac{2}{3} + 1 = -\frac{1}{3} x + \frac{1}{3}$$.

The first equality used the distributive property, and the second and third equalities were obtained by performing a multiplication and an addition.

To solve a linear equation, first simplify as above to obtain $$ax+b = cx+d$$. Then, subtract b and cx from both sides, to put all terms involving x on the left side and all constant terms on the right. In the above example, we obtain


 * $$ 2x - 3 - (-3) - \left( -\frac{1}{3} x \right) = -\frac{1}{3} x + \frac{1}{3} - (-3)

- \left( -\frac{1}{3} x \right) $$

and after cancellation, we have


 * $$ 2x + \frac{1}{3} x = \frac{1}{3} + 3$$.

Now that all terms involving the variable are on the left, we factor x out of the left side, and perform the addition on the right:


 * $$ \left( 2 + \frac{1}{3} \right) x = \frac{10}{3} $$.

Finally, we simplify the coefficient of x on the left side to obtain $$7/3 x$$, and divide by the coefficient to isolate x.


 * $$ x = \frac{\frac{10}{3}}{\frac{7}{3}} = \frac{10}{3} \cdot \frac{3}{7} = \frac{10}{7} $$.

Once the solution is found, it is a good idea to check that it is indeed a solution by substituting it back in for x in the original equation. In this example, substituting 10/7 back into the original equation and simplifying gives the equality -1/7 = -1/7, so that 10/7 is indeed the correct solution. Because all steps are reversible in this solution process, the only reason the solution found would not work in the original equation is an arithmetic error during the solution procedure.

The above method of solution always succeeds with one caveat. If the coefficient of x after all simplification is performed is 0, then we cannot divide by it to isolate x. In this case, the final form of the equation will be 0 x = a , for some constant a. If $$a=0$$, then every possible value of x will be a solution of the equation. If $$a \neq 0$$, then no value of x can be a solution, so the equation has no solutions. These exceptional cases are called degenerate cases, because after simplification the equation degenerates to an equation involving constannts, rather than first degree polynomials. In degenerate cases, there are either infinitely many solutions or there is no solution, while in non-degenerate cases, there is always a unique solution.

Linear equations in two variables
Every equation (linear or not) in two variables x and y has an associated graph. This is obtained by drawing perpendicular axes in a plane which enable assigning a pair of coordinates $$(x,y)$$ to each point in the plane. The graph of the equation is the set of points of the plane whose coordinates are solutions of the equation.

A linear equation in two variables can be simplified to the form $$p(x,y) = 0$$ where $$p(x,y)$$ is a linear polynomial in the variables x and y. As with equations in one variable, it is possible that this equation can "degenerate" so that x and y both occur with the coefficient 0, in which case either every possible pair of values substituted in for x and y give a solution or else there are no solutions.

Otherwise, the graph of the equation will be a line in the plane, hence the name "linear equation". If the coefficient of y is zero, the equation can be put in the form $$x=a$$, and the associated graph is the vertical line through the point $$(a,0)$$ on the x-axis, consisting of all points in the plane with x coordinate a. If the coefficient of y is nonzero, we can use the procedure for solving a linear equation in one variable to isolate y, obtaining an equivalent equation of the form


 * $$ y = f(x) $$

The graph of this equation is the graph of the linear function f(x). Often, one writes $$f(x) = mx + b$$, in which case the equation is


 * $$y = mx + b$$.

Written in this form, with y isolated on the left, the equation is said to be in slope-intercept form for the following reason. The constant m is the slope of the graph, and b is the y-intercept. Thus, when an equation is written in slope-intercept form, one can immediately obtain enough information from the equation to draw the graph.