# Linear equation

Two Graphs of linear equations in two variables

In mathematics, a linear equation is an equation that may be put in the form

where are the variables (or unknowns or indeterminates), and are the coefficients, which are often real numbers. The coefficients may be considered as parameters of the equation, and may be stated as arbitrary expressions, restricted to not contain any of the variables. To yield a meaningful equation for non-zero values of the coefficients are required not to be all zeros. This can be formulated as

In the words of algebra, a linear equation is obtained by equating to zero a linear polynomial over some field, where the coefficients are taken from, and that does not contain the symbols for the indeterminates.

The solutions of such an equation are the values that, when substituted to the unknowns, make the equality true.

The case of just one variable is of particular importance, and it is frequent that the term linear equation refers implicitly to this particular case, in which the name unknown for the variable is sensibly used.

All the pairs of numbers that are solutions of a linear equation in two variables form a line in the Euclidean plane, and every line may be defined as the solutions of a linear equation. This is the origin of the term linear for qualifying this type of equations. More generally, the solutions of a linear equation in n variables form a hyperplane (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 its content applies for complex solutions and, more generally, for linear equations with coefficient and solutions in any field. For the case of several simultaneous linear equations, see System of linear equations.

## One variable

Frequently the term linear equation refers implicitly to the case of just one variable. This case, in which the name unknown for the variable is sensibly used, is of particular importance, since it offers a unique value as solution to the equation. According to the above definition such an equation has the form

and, for a ≠ 0, a unique value as solution

The above equation may always be rewritten to

and the solution is of course the same in both cases:

In the case of , two possibilities emerge:

1. Every value for is a solution to the equation and
2. There is no solution for the equation the equation is said to be inconsistent.

## Two variables

In the case of just two variables the indexed variable names and and the respective coefficients and are often replaced, for the convenience of not having to deal with indices, by , , and , respectively. As a consequence, the coefficient in the above notation, the so called constant term, must also be renamed, conveniently to . A linear equation in two variables is then denoted as

Any change to such an equation that does not alter the set of solutions, i.e., the set of pairs , that satisfy this equation (i.e., make it an identity), generates an equivalent equation. It is immediate that changing the involved names (e.g. capitalizing names or using other letters) and also reordering the equation (e.g. by moving terms to the other side), does not change this set of solutions, and thus results in an equivalent equation, like, e.g.

with and

These equivalent variants are sometimes given generic names, like general form or standard form,[1] but contribute no new concepts.

The set of solutions also does not change when both sides of the equation are multiplied by the same non-zero number. According to the above definition, and (identically and ) are not both zero, so multiplying the equation by the reciprocal of one non-zero coefficient, results in an equivalent equation that has as the coefficient of one variable. The variable with the coefficient can be isolated on the left hand side, leaving an expression, possibly containing the other variable on the right hand side. This leads to either

with and or
with and

When both coefficients and are not zero, then both forms exist, and, assuming real numbers as coefficients and for the domain of the variables, the set of solutions for both equations can then be denoted as

which is equal to the set

In this case both components of the pairs in the set vary over all real numbers, thereby depending in a so called linear manner on each other.

When exactly one coefficient, either or , is not zero, then one equation remains, which is either

for with the set of solutions or
for with the set of solutions

For both alternatives this is a set of pairs of numbers, where either the second component is a constant, and the first varies over all the reals ( ), or the first is a constant, and the second varies over all the reals ( ).

### In Cartesian coordinates

Every single solution of a linear equation in two variables can be interpreted as two coordinate values, fixing a point in the Euclidean plane with a Cartesian coordinate system. The sets of solutions of such an equation make up a two-dimensional graph, which can be depicted in this plane. Conventionally, the first component of a solution , the -value, is assigned to a horizontally drawn -axis, and the second component, the -value, to a vertical -axis.

Vertical Line

In the case of the equation is and the set of its solutions has a vertical line as its graph, as shown in the figure to the right. The value where the line intersects the -axis in the point , is called an -intercept. Except for when the graph coincides with the -axis, graphs of this kind do not intersect the -axis, they have no -intercept.

The set of solutions defines a function and, simultaneously, the graph of this function, by interpreting the pairs as provided that any two such solutions that differ in their second value ( ), also differ in their respective first values ( ). The set violates this condition: all real values in the second component have the same first component Nevertheless, a graph for this set may be drawn, but it is not a graph of a function under the conventional assignment of axes, it obviously fails the vertical line test. This is the only type of straight line which is not the graph of any function .

Horizontal Line

The sets and satisfy the above condition, and the graph of is shown to the right. In this case of the graph of the constant function is a horizontal line. The value where the line intersects the -axis, is called -intercept. Except for where the graph coincides with the -axis, graphs of this kind have no -intercept.

In the case of with the equation the set of solutions is It consists of pairs of numbers, with the first component varying over all the reals, and the other being calculated by a simple expression, representing a linear map ( ) and adding a constant ( ). This is sometimes called a linear affine function, or simply also linear function, slightly abusing the strict term linear. Also in this case the graph of a linear equation in two variables is a straight line (see figure at the top) that intersects the -axis at -intercept (i.e., is a solution) and the -axis at the -intercept (i.e., is a solution).

Besides the intercepts being obvious from graphing the solutions of a linear equation in two variables, also their ratio (if it exists) can be graphically interpreted as determining the incline of the considered line (and all lines parallel to it). The slope of a straight line, usually introduced as rise over run, is the negative ratio of the rise, the -intercept, to the run, the -intercept. The negative sign accommodates for a positive slope, when the line rises for increasing -values. Immediately

which holds if both intercepts exist. If the -intercept does not exist ( ), the slope equals belonging to a horizontal line.

Since rise and run of a straight line can be determined not only between the intercept points and the origin ( and ), but also between arbitrary points and on the line, the slope may also be determined by

Denoting the angle enclosed by the -axis and the line as then

For the slope is undefined ( ).

This shows that only two of and can be selected independently.

With the premise that at least one axis is intersected, and since both intercept values may range over the whole real number line, all parallels to both axes as well as all oblique straight lines, i.e., in fact all straight lines in the Euclidean plane, can be expressed by linear equations in two variables, and all such equations denote either oblique or axis-parallel straight lines. Therefore all equations, equivalent to one of the above forms are often referred to as "equations of a line". They are adjusted to fit best to specific tasks, and are given therefore specific names, described below. In what follows, are the names of variables, and other letters denote constants (fixed numbers) as coefficients.

### Slope–intercept form

This form relies on the habit of writing and the conventional way of assigning the variables of the linear equation to the axes of a Cartesian coordinate system, drawn in the conventional manner as described above. This form exists only for allowing to isolate on the left hand side

This way the slope describes the inclination of the straight line which is the graph of this equation. The slope is positive for a line ascending to the right and negative, if the line ascends to the left. A zero-slope belongs to a horizontal line.

The -intercept fixes the point where the line crosses the -axis, and characterizes lines that cross the origin

Recalling the -intercept as the above slope-intercept form, employing the slope and the -intercept, can be transformed to

involving the slope and the -intercept .

In the case of there is no slope-intercept form in the above way, because a slope does not exist for .

For it is possible to express the inverse functions in the slope-intercept form as

with

The graph of this equation, having the same set of solutions, is necessarily identical to the above graph, but depicting it under exchanged assignment of the variables to the coordinate-axes ( ), yields the usual -graph for inverse functions, the -graph mirrored along This holds for both and

The graph of a vertical line ( ) with no existing slope and the equation changes under this inverted assignment to the graph of the function with zero-slope ( an arbitrary constant), and vice versa.

### Point–slope form

It is observational evident that fixing an arbitrary point on a line and a slope uniquely defines this straight line. In the slope-intersect form this point on the line is either taken as the intersection with the -axis, or the intersection with the -axis and is combined with the slope , provided its existence, to establish the equation for the according line. Generalizing this approach to an arbitrary point with coordinates yields:

The point-slope form expresses the fact that the difference of the coordinates between two points on a line (i.e., ) is proportional to the difference of the -coordinate (i.e., ), with the proportionality constant the slope of the line.

### Intercept form

Straight lines that cross both coordinate axis outside the origin can be specified via the intercept form, that employs just these two values to specify an appropriate equation

The intercept form results from moving in the equation to the right side, and then multiplying both sides of the equation with yielding

which is identical to the above form. The intercept form also works conveniently in higher dimensions for specifying (hyper)planes, when their intersections with all coordinate axes exist and are known.

### Two-point form

When two points and on a line with (no vertical lines!) are known, the slope, determined by these points as outlined above, can be used with either point to employ the point-slope form, thereby establishing appropriate equations for this line, based on two non-coinciding points with different -values. Using yields, e.g.:

Multiplying both sides of this equation by yields an equation, generally referred to as the symmetric form:

Expanding, regrouping, and appropriately factoring the products leads to

identifying, up to an arbitrary non-zero factor: and

The products on the left hand side can be reproduced by evaluating the mnemonic determinant

### Matrix form

Writing a linear equation in two unknowns in the form

and considering the collection of coefficients as a -matrix, and the collection of variables as a -matrix, then their matrix product equals the -matrix

This notation can easily expanded to more linear equations in more than two variables. For example, a system of two equations in two variables

can be denoted with a -matrix and a -matrix for the coefficients, by equaling the matrix product of the -coefficient matrix with the -variable matrix to the -matrix of the constant terms:

A system of three linear equations in four variables would employ a -matrix for the coefficients of the variables, which, multiplied with the -(column)-matrix of the variables, is equaled to the -matrix of the constant terms. For this ready extendability to higher dimensions, the matrix notation is a common representation tool for a system of linear equations, in linear algebra, and in computer programming. There are named methods for solving systems of linear equations, like Gauss-Jordan which can be expressed in matrix elementary row operations.

### Parametric form

The parametric form of a curve is useful to e.g. describe the movement of a point along this curve, and controlling this movement with a single parameter. This setting resembles the task in physics, where a particle starts at time at some point in space, say , and travels along the curve, where it reaches point at time With linear equations the curves are restricted to straight lines.

This task can be solved by adding a motion from in the direction of the -axis and a simultaneous motion from in the direction of the -axis, both motions controlled by the parameter The motion in -direction can be described as

and similarly, the motion in -direction can be described as

These two linear equations, with variables and , make up a parametric form for a linear equation with variables that can be constructed from the two-point form with and as points.

For and for For all in the interval the point is on the straight line segment connecting the points for and This is sometimes called interpolation. For values of outside this interval, points outside of the segment, but still on the line are addressed extrapolation.

### 2D vector determinant form

The equation of a line can also be written as the determinant of two vectors. If and are unique points on the line, then will also be a point on the line if the following is true:

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 , and . Thus and , then the above equation becomes:

Thus,

Ergo,

Then dividing both side by would result in the “Two-point form” shown above, but leaving it here allows the equation to still be valid when .

### 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 y-intercept is 0, has the following properties:

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 non-zero y-intercepts, 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.

### Example

An everyday example of the use of different forms of linear equations is computation of tax with tax brackets. This is commonly done with a progressive tax computation, using either point–slope form or slope–intercept form.

## More than two variables

A linear equation can involve more than two variables. Every linear equation in n unknowns may be rewritten

where, a1, a2, ..., an represent numbers, called the coefficients, x1, x2, ..., xn 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 x1, x2 and x3.

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 one to suppose a1 ≠ 0, and rewrite the equation

In other words, if ai ≠ 0, one may choose arbitrary values for all the unknowns except xi, and express xi in term of these values.

If n = 3 the set of the solutions is a plane in a three-dimensional space. More generally, the set of the solutions is an (n  1)-dimensional hyperplane in a n-dimensional Euclidean space (or affine space if the coefficients are complex numbers or belong to any field).