In mathematics, a linear equation is an equation that may be put in the form a1x1+…+anxn+b=0, where x1,…,xn are the variables (or unknowns), and b,a1,…,an are the coefficients, which are often real numbers. The coefficients may be considered as parameters of the equation and may be arbitrary expressions, provided they do not contain any of the variables. To yield a meaningful equation, the coefficients a1,…,an are required to not all be zero. Alternatively, a linear equation can be obtained by equating to zero a linear polynomial over some field, from which the coefficients are taken. The solutions of such an equation are the values that, when substituted for the unknowns, make the equality true. In the case of just one variable, there is exactly one solution (provided that a1≠0). Often, the term linear equation refers implicitly to this particular case, in which the variable is sensibly called the unknown. In the case of two variables, each solution may be interpreted as the Cartesian coordinates of a point of the Euclidean plane. The solutions of a linear equation form a line in the Euclidean plane, and, conversely, every line can be viewed as the set of all solutions of a linear equation in two variables. This is the origin of the term linear for describing this type of equation. More generally, the solutions of a linear equation in n variables form a hyperplane (a subspace of dimension n − 1) in the Euclidean space of dimension n. Linear equations occur frequently in all mathematics and their applications in physics and engineering, partly because non-linear systems are often well approximated by linear equations. This article considers the case of a single equation with coefficients from the field of real numbers, for which one studies the real solutions. All of its content applies to complex solutions and, more generally, to linear equations with coefficients and solutions in any field. For the case of several simultaneous linear equations, see system of linear equations.
One variable A linear equation in one variable x can be written as ax+b=0, with a≠0. It has exactly one solution: x=−ba
Two variables A linear equation in two variables x and y can be written as ax+by+c=0, where a and b are not both 0. If a and b are real numbers, it has infinitely many solutions.
Linear function
If b ≠ 0, the equation
ax+by+c=0 is a linear equation in the single variable y for every value of x. It therefore has a unique solution for y, which is given by
y=−abx−cb. This defines a function. The graph of this function is a line with slope −ab and y-intercept −cb. The functions whose graph is a line are generally called linear functions in the context of calculus. However, in linear algebra, a linear function is a function that maps a sum to the sum of the images of the summands. So, for this definition, the above function is linear only when c = 0, that is when the line passes through the origin. To avoid confusion, the functions whose graph is an arbitrary line are often called affine functions, and the linear functions such that c = 0 are often called linear maps.
Geometric interpretation
Each solution (x, y) of a linear equation
ax+by+c=0 may be viewed as the Cartesian coordinates of a point in the Euclidean plane. With this interpretation, all solutions of the equation form a line, provided that a and b are not both zero. Conversely, every line is the set of all solutions of a linear equation. The phrase "linear equation" takes its origin in this correspondence between lines and equations: a linear equation in two variables is an equation whose solutions form a line. If b ≠ 0, the line is the graph of the function of x that has been defined in the preceding section. If b = 0, the line is a vertical line (that is a line parallel to the y-axis) of equation x=−ca, which is not the graph of a function of x. Similarly, if a ≠ 0, the line is the graph of a function of y, and, if a = 0, one has a horizontal line of equation y=−cb.
Equation of a line There are various ways of defining a line. In the following subsections, a linear equation of the line is given in each case.
Slope–intercept form or Gradient-intercept form A non-vertical line can be defined by its slope m, and its y-intercept y0 (the y coordinate of its intersection with the y-axis). In this case, its linear equation can be written
y=mx+y0. If, moreover, the line is not horizontal, it can be defined by its slope and its x-intercept x0. In this case, its equation can be written
y=m(x−x0), or, equivalently,
y=mx−mx0. These forms rely on the habit of considering a nonvertical line as the graph of a function. For a line given by an equation
ax+by+c=0, these forms can be easily deduced from the relations
m=−ab,x0=−ca,y0=−cb.
Point–slope form or Point-gradient form A non-vertical line can be defined by its slope m, and the coordinates x1,y1 of any point of the line. In this case, a linear equation of the line is
y=y1+m(x−x1), or
y=mx+y1−mx1. This equation can also be written
y−y1=m(x−x1) to emphasize that the slope of a line can be computed from the coordinates of any two points.
Intercept form A line that is not parallel to an axis and does not pass through the origin cuts the axes into two different points. The intercept values x0 and y0 of these two points are nonzero, and an equation of the line is
xx0+yy0=1. (It is easy to verify that the line defined by this equation has x0 and y0 as intercept values).
Two-point form Given two different points (x1, y1) and (x2, y2), there is exactly one line that passes through them. There are several ways to write a linear equation of this line. If x1 ≠ x2, the slope of the line is y2−y1x2−x1. Thus, a point-slope form is
y−y1=y2−y1x2−x1(x−x1). By clearing denominators, one gets the equation
(x2−x1)(y−y1)−(y2−y1)(x−x1)=0, which is valid also when x1 = x2 (to verify this, it suffices to verify that the two given points satisfy the equation). This form is not symmetric in the two given points, but a symmetric form can be obtained by regrouping the constant terms:
(y1−y2)x+(x2−x1)y+(x1y2−x2y1)=0 (exchanging the two points changes the sign of the left-hand side of the equation).
Determinant form The two-point form of the equation of a line can be expressed simply in terms of a determinant. There are two common ways for that. The equation (x2−x1)(y−y1)−(y2−y1)(x−x1)=0 is the result of expanding the determinant in the equation
… excerpt ends here. Continue reading the full article.



