Linear Algebra/Systems of Linear Equations
Systems of Linear Equations
A linear equation in the variables , is an equation that can be written in the form
Linear equation (1):
where b and the coefficients , are real or complex number, usually known in advance. The subscript n may be any positive integer. In most textbook examples and exercises, n is normally not higher than 5. In real-life problems, n might be 50 or 5000, or even higher.
The equations
- and
are both linear because they can be arranged algebraically as in the linear equation (1):
- and
The equations
- and
are not linear because of the presence of in the first equation and in the second equation. This means they can't be rearranged as in the linear equation (1).
A system of linear equations, also called a linear system, is a collection of one or more linear equations involving the same variables. An example is
Linear system (2):
A solution of the system is a list of numbers that makes each equation true, when the values are substituted for respectively. For example, is a solution to the system (2) because, when these values are substituted in (2) for respectively, the equations simplify to and .
The set of all possible solutions is called the solution set of the linear system. Two linear systems are called equivalent if they have the same solution set. That is, each solution of the first system is a solution to the second system, and vice versa.
Finding the solution set of a system ot two linear equations in two variables is easy because it is the same as finding the intersection point of two lines. A typical problem is
The graphs of these lines, which we denote by and . A pair of numbers statisfies both equations in the system if and only if the point lies on both and . In the system above, the solution is the single point , as you easily can see on Figure 1.

Of course, two lines does not have to intersect in a single point, they could be parallel, or they could coincide and "intersect" at every point on the line. Figure 2 and Figure 3 shows graphs to visualize this.


A system of linear equations has either
- exactly one solution
- infinitely many solutions
- no solution
A system of linear equations is said to be consistent if it has either one solution or infinitely many solutions, and a systems is said to be inconsistent if it has no solution.
Matrix Notation
The essential information of a linear system can be described in a rectangular array called a matrix. Given the system
with the coefficients of each variable aligned in columns, we make a matrix called the coefficient matrix (or matrix of coeffients) of the system. The coefficient matrix looks like this
Which make sense if you look at the definition of a linear equation (1). The second row contains a zero because the second equation could be written as
We also have a matrix called the augmented matrix which for the same system looks like this
An augmented matrix of a system consists of the coefficient matrix with an added column containing the constants from the right sides of the equation. Again look at the linear equation definition (1), if it does not make sense.
The size of a matrix tells us how many rows and columns it has. The augmented matrix above has 3 rows and 4 columns, therefore it is called a 3x4 (read "3 by 4") matrix. m and n are positive integers, an m x n matrix is a rectangular array of numbers with m rows and n columns. Matrix notation will simplify the calculations of a linear system.
Elementary Row Operations
There are three elementary row operations:
- Replacement
- Interchanging
- Scaling
The following are an explanation and examples of the three different operations. In the chapter Systems of Linear Equations we have used all of these operations, except Scaling.
An important thing to remember is that all operations can be used on all matrices, not just on matrices derived from linear systems.
Replacement
Replace one row by the sum of itself and a multiple of another row. A more common paraphrase of row replacement is "Add to one row a multiple of another row."
An example is, we are given the linear system:
Which can be written in matrix notation, as an augmented matrix, like this
Now we have decided to eliminate the term in equation 2, this can be done by adding -2 times equation 1 to equation 2
Which gives us the matrix
Interchanging
Interchange two rows.
An example is, we are given the matrix
Here we have performed an interchange operation on the two rows
This is a useful operation when you are trying to solve a linear system, and can see that it will be easier to solve it by interchanging two rows. It is a widely used operation, even though it seems odd and not very usable.
Scaling
Multiply all entries in a row by a nonzero constant.
An example is, we are given the matrix
Now a scaling operation have been performed on the first row, by multiplying by -2
Solving a Linear System
The basic strategy for solving a linear systems is to replace one system with an equivalent system (i.e. another system with the same solution set) that is easier to solve. This is done by using term from the first equation to eliminate the terms in the other equations, use the term from the second equation to eliminate the terms in the other equations, and so forth, until you get a very simple equivalent system of equations. There are three operations that are used to simplify a system. You can replace one equation by the sum of itself and a multiple of another equation, we can interchange two equations, and multiply all the terms in an equation with a nonzero constant. During this example, we can see why these operations do not change the solution set of a system.
Example 1: Solve this linear system
The augmented matrix for this system is
The first thing we want is keep in the first equation and eliminate it from the other equations.
To achieve this, we add 4 times equation 1 to equation 3.
The result of this calculation is written in place of the original equation 3
Next thing we want to do is to multiply equation 2 with to obtain 1 as the coefficient for , which will simplify arithmetic in the next step
Now, we use in equation 2 to eliminate the in equation 3
The new linear system has a triangular form, which is called echelon form, and looks like this
The next step is to use in equation 3 to eliminate the and in equation 1 and 2.
The system now looks like this
Now we are just one step away from obtaining the solution of the linear system. The last step is to add 2 times equation 2 to equation 1. When doing so we obtain the linear system, which has a reduced echelon form
Now that the linear system is solved, it shows that the only solution of the original system is . However, because of the many calculations involved, it is a good practice to check you work. This is done by substituting the solution into the original system
This shows us that the solution we found is right, and therefore is a solution of the original linear system.