Linear equations, or "linear systems," are sums of variables, each multiplied by a coefficient, which may be set equal to a constant. Examples of non-linear equations are polynomials and trigonometric functions. A linear system may have a unique solution, and infinite number of solution, or no solutions and said to be inconsistent. If there are an infinite number of solutions, some variables will be "free" variables and can take any value, with others either expressed in terms of free variables or constant.
Linear equations are represented by matrices in two ways:
- coefficient matrix
- augmented matrix
In order to demonstrate these, consider the set of equations:
Equations are generally written out with all the variables on the left and any constant terms on the right. The order terms are written is also kept the same (i.e. first term is x, second term is y and so on). In the coefficient matrix representation, the elements of the matrix are the coefficients of the variables. This produces, for a system of n equations, and n by n matrix. In the case above, the coefficient matrix would be:
The augmented matrix is the coefficient matrix but with an additional column containing the right hand side of each equation. For the above, the augmented matrix would be:
The coefficients of variables in the matrix are usually separated from the constant terms by a vertical line. This form encodes all the information of the equations into a single matrix.
Methods of Solving Linear Equations
The simplest way to solve linear equations is by rearranging one to make one variable the subject and then substituting this into all the other equations to eliminate that variable. This is repeated until only one equation is left, which will be the solution. The other variables can be found by plugging this into the rearranged equations. Consider the system of equations above. The first equation can be rearranged as x=5-y. Putting this into the second equation gives:
From this, y=-8. Setting y=-8 in x=5-y gives x=3, so the solution is x=3, y=-8.
Although this method will work for any number of variables, for more than 3 variables the method becomes very tedious and it is easy to make mistakes. Therefore, other methods such as Gaussian elimination are used for more than 3 variables.
A more general approach for solving a set of linear equations is Gaussian elimination. This can easily be programmed for use by a computer.
Theorems relating to linear equations
The Kronecker–Capelli theorem states that there is a solution to a linear system in n variables if and only if the rank of the coefficient matrix is equal to the rank of the augmented matrix. More specifically, if the rank of the coefficient matrix is n, then there is a single unique solution. Otherwise, there are an infinite number of solutions.