2. Systems of Linear Equations#
Systems of linear equations and the methods used to solve them is a fundamental part of linear algebra. They are used to describe relationships between sets of variables and have many applications including co-ordinate geometry, numerical methods, computer science, engineering and statistics. There are many techniques we can use to compute the solutions to systems of linear equations and we will be covering the most common of these.
A linear equation is an equation formed using a set of variables multiplied by scalar coefficients where the sum is of these is equal to some constant scalar value. For example if \(x_1, x_2, \ldots, x_n\) are variables, \(a_1, a_2, \ldots, a_n\) are coefficients and \(b\) is a constant value then a linear equation can take the form
A nonlinear equation is an equation formed where one or more of the variables have exponents not equal to 1 (e.g., a polynomial equation) or two or more of the variables are multiplied by each other. The field of linear algebra is only concerned with linear equations.
(System of linear equations)
A system of linear equations is a collection of one or more linear equations expressed using the same set of variables. For example,
where \(x_1, x_2, \ldots, x_n\) are variables, \(a_{11}, a_{12}, \ldots, a_{mn}\) are coefficients and \(b_1, b_2, \ldots, b_n\) are constants.
In general we would know the values of \(a_{ij}\) and \(b_i\) and we would like to find out what the values of \(x_i\) are.
2.1. Representing systems of linear equation as a matrix equation#
Systems of linear equations are often represented using the matrix equation \(A \vec{x} = \vec{b}\) where \(A\) is an \(m \times n\) coefficient matrix containing the values of \(a_{ij}\), \(\vec{x}\) is an \(m \times\) variable vector containing the variables \(x_i\) and \(\vec{b}\) is a \(m \times 1\) constant vector containing the constant terms \(b_i\). Vectors are introduced in the next chapter but for now simply consider them as matrices with a single column.
For example, the follow system of linear equations
can be written as the matrix equation
2.2. Solving systems of linear equations using algebra#
One way which we can solve systems of linear equations is using simple algebra. The usual approach is to try to solve for each unknown in turn by eliminating all of the other unknowns. For example, consider the system of linear equations
We could eliminate \(x_2\) be subtracting 3 times the first equation from the second to give
which is easily solved to give \(x_1 = 1\). Now that we know the value of \(x_1\) we can substitute it into any equation in the system to give \(x_2\). Substituting \(x_1 = 1\) into the first equation gives
so \(x_2 = 2\). The solution should satisfy all equations in the system to checking that it also satisfies the second equation
so we know that \(x_1 = 1\) and \(x_2 = 2\) is the solution. Whilst this approach is simple to implement for small systems of linear equations the algebra will soon become unwieldy for larger systems which is why we use the methods that are covered in this chapter.