Graph sample of linear equations.
A linear equation is an algebraic equation in which each term is either a constant or the product of a constant and (the first power of) a single variable.
Linear equations can have one or more variables. Linear equations occur abundantly in most subareas of mathematics and especially in applied mathematics. While they arise quite naturally when modeling many phenomena, they are particularly useful since many nonlinear equations may be reduced to linear equations by assuming that quantities of interest vary to only a small extent from some "background" state. Linear equations do not include exponents.
This article considers the case of a single equation for which one searches the real solutions. All its content applies for complex solutions and, more generally for linear equations with coefficients and solutions in any field.
One variable
A linear equation in one unknown x may always be rewritten

ax=b.
If a ≠ 0, there is a unique solution

x=\frac{b}{a}.
If a = 0, then either the equation does not have any solution, if b ≠ 0 (it is inconsistent), or every number is a solution, if b is also zero.
Two variables
A common form of a linear equation in the two variables x and y is

y = mx + b,\,
where m and b designate constants (parameters). The origin of the name "linear" comes from the fact that the set of solutions of such an equation forms a straight line in the plane. In this particular equation, the constant m determines the slope or gradient of that line, and the constant term b determines the point at which the line crosses the yaxis, otherwise known as the yintercept.
Since terms of linear equations cannot contain products of distinct or equal variables, nor any power (other than 1) or other function of a variable, equations involving terms such as xy, x^{2}, y^{1/3}, and sin(x) are nonlinear.
Forms for twodimensional linear equations
Linear equations can be rewritten using the laws of elementary algebra into several different forms. These equations are often referred to as the "equations of the straight line." In what follows, x, y, t, and θ are variables; other letters represent constants (fixed numbers).
General (or standard) form
In the general (or standard^{[1]}) form the linear equation is written as:

Ax + By = C, \,
where A and B are not both equal to zero. The equation is usually written so that A ≥ 0, by convention. The graph of the equation is a straight line, and every straight line can be represented by an equation in the above form. If A is nonzero, then the xintercept, that is, the xcoordinate of the point where the graph crosses the xaxis (where, y is zero), is C/A. If B is nonzero, then the yintercept, that is the ycoordinate of the point where the graph crosses the yaxis (where x is zero), is C/B, and the slope of the line is −A/B. The general form is sometimes written as:

ax + by + c = 0, \,
where a and b are not both equal to zero. The two versions can be converted from one to the other by moving the constant term to the other side of the equal sign.
Slope–intercept form

y = mx + b,\,
where m is the slope of the line and b is the y intercept, which is the y coordinate of the location where line crosses the y axis. This can be seen by letting x = 0, which immediately gives y = b. It may be helpful to think about this in terms of y = b + mx; where the line passes through the point (0, b) and extends to the left and right at a slope of m. Vertical lines, having undefined slope, cannot be represented by this form.
Point–slope form

y  y_1 = m( x  x_1 ),\,
where m is the slope of the line and (x_{1},y_{1}) is any point on the line.
The pointslope form expresses the fact that the difference in the y coordinate between two points on a line (that is, y − y_{1}) is proportional to the difference in the x coordinate (that is, x − x_{1}). The proportionality constant is m (the slope of the line).
Twopoint form

y  y_1 = \frac{y_2  y_1}{x_2  x_1} (x  x_1),\,
where (x_{1}, y_{1}) and (x_{2}, y_{2}) are two points on the line with x_{2} ≠ x_{1}. This is equivalent to the pointslope form above, where the slope is explicitly given as (y_{2} − y_{1})/(x_{2} − x_{1}).
Multiplying both sides of this equation by (x_{2} − x_{1}) yields a form of the line generally referred to as the symmetric form:

(x_2  x_1)(y  y_1)=(y_2  y_1)(x  x_1).\,
Expanding the products and regrouping the terms leads to the general form:

x\,(y_2y_1)  y\,(x_2x_1)= x_1y_2  x_2y_1
Using a determinant, one gets a determinant form, easy to remember:

\begin{vmatrix} x&y&1\\ x_1&y_1&1\\ x_2&y_2&1 \end{vmatrix} =0\,.
Intercept form

\frac{x}{a} + \frac{y}{b} = 1,\,
where a and b must be nonzero. The graph of the equation has xintercept a and yintercept b. The intercept form is in standard form with A/C = 1/a and B/C = 1/b. Lines that pass through the origin or which are horizontal or vertical violate the nonzero condition on a or b and cannot be represented in this form.
Matrix form
Using the order of the standard form

Ax + By = C,\,
one can rewrite the equation in matrix form:

\begin{pmatrix} A&B \end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix} = \begin{pmatrix}C\end{pmatrix}.
Further, this representation extends to systems of linear equations.

A_1x + B_1y = C_1,\,

A_2x + B_2y = C_2,\,
becomes:

\begin{pmatrix} A_1&B_1\\ A_2 & B_2 \end{pmatrix} \begin{pmatrix} x\\y \end{pmatrix} = \begin{pmatrix} C_1\\ C_2 \end{pmatrix}.
Since this extends easily to higher dimensions, it is a common representation in linear algebra, and in computer programming. There are named methods for solving system of linear equations, like GaussJordan which can be expressed as matrix elementary row operations.
Parametric form

x = T t + U\,
and

y = V t + W.\,
Two simultaneous equations in terms of a variable parameter t, with slope m = V / T, xintercept (VU  WT) / V and yintercept (WT  VU) / T. This can also be related to the twopoint form, where T = p  h, U = h, V = q  k, and W = k:

x = (p  h) t + h\,
and

y = (q  k)t + k.\,
In this case t varies from 0 at point (h,k) to 1 at point (p,q), with values of t between 0 and 1 providing interpolation and other values of t providing extrapolation.
2D vector determinant form
The equation of a line can also be written as the determinant of two vectors. If P_1 and P_2 are unique points on the line, then P will also be a point on the line if the following is true:

\det( \overrightarrow{P_1 P} , \overrightarrow{P_1 P_2} ) = 0.
One way to understand this formula is to use the fact that the determinant of two vectors on the plane will give the area of the parallelogram they form. Therefore, if the determinant equals zero then the parallelogram has no area, and that will happen when two vectors are on the same line.
To expand on this we can say that P_1 = (x_1 ,\, y_1), P_2 = (x_2 ,\, y_2) and P = (x ,\, y). Thus \overrightarrow{P_1 P} = (xx_1 ,\, yy_1) and \overrightarrow{P_1 P_2} = (x_2x_1 ,\, y_2y_1), then the above equation becomes:

\det \begin{pmatrix}xx_1&yy_1\\x_2x_1&y_2y_1\end{pmatrix} = 0.
Thus,

( x  x_1 )( y_2  y_1 )  ( y  y_1 )( x_2  x_1 )=0.
Ergo,

( x  x_1 )( y_2  y_1 ) = ( y  y_1 )( x_2  x_1 ).
Then dividing both side by ( x_2  x_1 ) would result in the “Twopoint form” shown above, but leaving it here allows the equation to still be valid when x_1 = x_2.
Special cases

y = b\,
Horizontal Line y = b
This is a special case of the standard form where A = 0 and B = 1, or of the slopeintercept form where the slope m = 0. The graph is a horizontal line with yintercept equal to b. There is no xintercept, unless b = 0, in which case the graph of the line is the xaxis, and so every real number is an xintercept.

x = a\,
Vertical Line x = a
This is a special case of the standard form where A = 1 and B = 0. The graph is a vertical line with xintercept equal to a. The slope is undefined. There is no yintercept, unless a = 0, in which case the graph of the line is the yaxis, and so every real number is a yintercept. This is the only type of line which is not the graph of a function (it obviously fails the vertical line test).
Connection with linear functions
A linear equation, written in the form y = f(x) whose graph crosses the origin (x,y) = (0,0), that is, whose yintercept is 0, has the following properties:

f ( x_1 + x_2 ) = f ( x_1) + f ( x_2 )\
and

f ( a x ) = a f ( x ),\,
where a is any scalar. A function which satisfies these properties is called a linear function (or linear operator, or more generally a linear map). However, linear equations that have nonzero yintercepts, when written in this manner, produce functions which will have neither property above and hence are not linear functions in this sense. They are known as affine functions.
More than two variables
A linear equation can involve more than two variables. Every linear equation in n unknowns may be rewritten

a_1 x_1 + a_2 x_2 + \cdots + a_n x_n = b,
where, a_{1}, a_{2}, ..., a_{n} represent numbers, called the coefficients, x_{1}, x_{2}, ..., x_{n} are the unknowns, and b is called the constant term. When dealing with three or fewer variables, it is common to use x, y and z instead of x_{1}, x_{2} and x_{3}.
If all the coefficients are zero, then either b ≠ 0 and the equation does not have any solution, or b = 0 and every set of values for the unknowns is a solution.
If at least one coefficient is nonzero, a permutation of the subscripts allows to suppose a_{1} ≠ 0, and rewrite the equation

x_1 = b \frac{a_2}{a_1}x_2 \cdots  \frac{a_n}{a_1}x_n.
In other words, if a_{i} ≠ 0, one may choose arbitrary values for all the unknowns except x_{i}, and express x_{i} in term of these values.
If n = 3 the set of the solutions is a plane in a threedimensional space. More generally, the set of the solutions is an (n – 1)dimensional hyperplane in a ndimensional Euclidean space (or affine space if the coefficients are complex numbers or belong to any field).
See also
Notes
References

Barnett, R.A.; Ziegler, M.R.; Byleen, K.E. (2008), College Mathematics for Business, Economics, Life Sciences and the Social Sciences (11th ed.), Upper Saddle River, N.J.: Pearson,
External links
This article was sourced from Creative Commons AttributionShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, EGovernment Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a nonprofit organization.