Lecture 1
Lecture 1
Systems of Linear Equations
In this lecture, we will introduce linear systems and the method of row reduction to solve
them. We will introduce matrices as a convenient structure to represent and solve linear
systems. Lastly, we will discuss geometric interpretations of the solution set of a linear
system in 2- and 3-dimensions.
1.1 What is a system of linear equations?
Definition 1.1: A system of m linear equations in n unknown variables x1 , x2 , . . . , xn
is a collection of m equations of the form
a11 x1 + a12 x2 + a13 x3 + · · · + a1n xn = b1
a21 x1 + a22 x2 + a23 x3 + · · · + a2n xn = b2
a31 x1 + a32 x2 + a33 x3 + · · · + a3n xn = b3 (1.1)
.. .. .. .. ..
. . . . .
am1 x1 + am2 x2 + am3 x3 + · · · + amn xn = bm
The numbers aij are called the coefficients of the linear system; because there are m equa-
tions and n unknown variables there are thefore m × n coefficients. The main problem with
a linear system is of course to solve it:
Problem: Find a list of n numbers (s1 , s2 , . . . , sn ) that satisfy the system of linear equa-
tions (1.1).
In other words, if we substitute the list of numbers (s1 , s2 , . . . , sn ) for the unknown
variables (x1 , x2 , . . . , xn ) in equation (1.1) then the left-hand side of the ith equation will
equal bi . We call such a list (s1 , s2 , . . . , sn ) a solution to the system of equations. Notice
that we say “a solution” because there may be more than one. The set of all solutions to a
linear system is called its solution set. As an example of a linear system, below is a linear
1
Systems of Linear Equations
system consisting of m = 2 equations and n = 3 unknowns:
x1 − 5x2 − 7x3 = 0
5x2 + 11x3 = 1
Here is a linear system consisting of m = 3 equations and n = 2 unknowns:
−5x1 + x2 = −1
πx1 − 5x2 = 0
√
63x1 − 2x2 = −7
And finally, below is a linear system consisting of m = 4 equations and n = 6 unknowns:
−5x1 + x3 − 44x4 − 55x6 = −1
√
πx1 − 5x2 − x3 + 4x4 − 5x5 + 5x6 =0
√ 1
63x1 − 2x2 − 15 x3 + ln(3)x4 + 4x5 − 33 x6 =0
√ 1
63x1 − 2x2 − x3 − 18 x4 − 5x6 =5
5
Example 1.2. Verify that (1, 2, −4) is a solution to the system of equations
2x1 + 2x2 + x3 = 2
x1 + 3x2 − x3 = 11.
Is (1, −1, 2) a solution to the system?
Solution. The number of equations is m = 2 and the number of unknowns is n = 3. There
are m × n = 6 coefficients: a11 = 2, a12 = 1, a13 = 1, a21 = 1, a22 = 3, and a23 = −1. And
b1 = 0 and b2 = 11. The list of numbers (1, 2, −4) is a solution because
2 · (1) + 2(2) + (−4) = 2
(1) + 3 · (2) − (−4) = 11
On the other hand, for (1, −1, 2) we have that
2(1) + 2(−1) + (2) = 2
but
1 + 3(−1) − 2 = −4 6= 11.
Thus, (1, −1, 2) is not a solution to the system.
A linear system may not have a solution at all. If this is the case, we say that the linear
system is inconsistent:
2
Lecture 1
INCONSISTENT ⇔ NO SOLUTION
A linear system is called consistent if it has at least one solution:
CONSISTENT ⇔ AT LEAST ONE SOLUTION
We will see shortly that a consistent linear system will have either just one solution or
infinitely many solutions. For example, a linear system cannot have just 4 or 5 solutions. If
it has multiple solutions, then it will have infinitely many solutions.
Example 1.3. Show that the linear system does not have a solution.
−x1 + x2 = 3
x1 − x2 = 1.
Solution. If we add the two equations we get
0=4
which is a contradiction. Therefore, there does not exist a list (s1 , s2 ) that satisfies the
system because this would lead to the contradiction 0 = 4.
Example 1.4. Let t be an arbitrary real number and let
s1 = − 32 − 2t
s2 = 23 + t
s3 = t.
Show that for any choice of the parameter t, the list (s1 , s2 , s3 ) is a solution to the linear
system
x1 + x2 + x3 = 0
x1 + 3x2 − x3 = 3.
Solution. Substitute the list (s1 , s2 , s3 ) into the left-hand-side of the first equation
− 32 − 2t + 32 + t + t = 0
and in the second equation
− 23 − 2t + 3( 23 + t) − t = − 23 + 9
2
=3
Both equations are satisfied for any value of t. Because we can vary t arbitrarily, we get an
infinite number of solutions parameterized by t. For example, compute the list (s1 , s2 , s3 )
for t = 3 and confirm that the resulting list is a solution to the linear system.
3
Systems of Linear Equations
1.2 Matrices
We will use matrices to develop systematic methods to solve linear systems and to study
the properties of the solution set of a linear system. Informally speaking, a matrix is an
array or table consisting of rows and columns. For example,
1 −2 1 0
A= 0 2 −8 8
−4 7 11 −5
is a matrix having m = 3 rows and n = 4 columns. In general, a matrix with m rows and
n columns is a m × n matrix and the set of all such matrices will be denoted by Mm×n .
Hence, A above is a 3 × 4 matrix. The entry of A in the ith row and jth column will be
denoted by aij . A matrix containing only one column is called a column vector and a
matrix containing only one row is called a row vector. For example, here is a row vector
u = 1 −3 4
and here is a column vector
3
v= .
−1
We can associate to a linear system three matrices: (1) the coefficient matrix, (2) the
output column vector, and (3) the augmented matrix. For example, for the linear system
5x1 − 3x2 + 8x3 = −1
x1 + 4x2 − 6x3 = 0
2x2 + 4x3 = 3
the coefficient matrix A, the output vector b, and the augmented matrix [A b] are:
5 −3 8 −1 5 −3 8 −1
A= 1 4 −6 , b = 0 , [A b] = 1 4 −6 0 .
0 2 4 3 0 2 4 3
If a linear system has m equations and n unknowns then the coefficient matrix A must be a
m × n matrix, that is, A has m rows and n columns. Using our previously defined notation,
we can write this as A ∈ Mm×n .
If we are given an augmented matrix, we can write down the associated linear system in
an obvious way. For example, the linear system associated to the augmented matrix
1 4 −2 8 12
0 1 −7 2 −4
0 0 5 −1 7
is
x1 + 4x2 − 2x3 + 8x4 = 12
x2 − 7x3 + 2x4 = −4
5x3 − x4 = 7.
4
Lecture 1
We can study matrices without interpreting them as coefficient matrices or augmented ma-
trices associated to a linear system. Matrix algebra is a fascinating subject with numerous
applications in every branch of engineering, medicine, statistics, mathematics, finance, biol-
ogy, chemistry, etc.
1.3 Solving linear systems
In algebra, you learned to solve equations by first “simplifying” them using operations that
do not alter the solution set. For example, to solve 2x = 8 − 2x we can add to both sides
2x and obtain 4x = 8 and then multiply both sides by 14 yielding x = 2. We can do
similar operations on a linear system. There are three basic operations, called elementary
operations, that can be performed:
1. Interchange two equations.
2. Multiply an equation by a nonzero constant.
3. Add a multiple of one equation to another.
These operations do not alter the solution set. The idea is to apply these operations itera-
tively to simplify the linear system to a point where one can easily write down the solution
set. It is convenient to apply elementary operations on the augmented matrix [A b] repre-
senting the linear system. In this case, we call the operations elementary row operations,
and the process of simplifying the linear system using these operations is called row reduc-
tion. The goal with row reducing is to transform the original linear system into one having
a triangular structure and then perform back substitution to solve the system. This is
best explained via an example.
Example 1.5. Use back substitution on the augmented matrix
1 0 −2 −4
0 1 −1 0
0 0 1 1
to solve the associated linear system.
Solution. Notice that the augmented matrix has a triangular structure. The third row
corresponds to the equation x3 = 1. The second row corresponds to the equation
x2 − x3 = 0
and therefore x2 = x3 = 1. The first row corresponds to the equation
x1 − 2x3 = −4
and therefore
x1 = −4 + 2x3 = −4 + 2 = −2.
Therefore, the solution is (−2, 1, 1).
5
Systems of Linear Equations
Example 1.6. Solve the linear system using elementary row operations.
−3x1 + 2x2 + 4x3 = 12
x1 − 2x3 = −4
2x1 − 3x2 + 4x3 = −3
Solution. Our goal is to perform elementary row operations to obtain a triangular structure
and then use back substitution to solve. The augmented matrix is
−3 2 4 12
1 0 −2 −4 .
2 −3 4 −3
Interchange Row 1 (R1 ) and Row 2 (R2 ):
−3 2 4 12 1 0 −2 −4
R ↔R2
1 0 −2 −4 −−1−−→ −3 2 4 12
2 −3 4 −3 2 −3 4 −3
As you will see, this first operation will simplify the next step. Add 3R1 to R2 :
1 0 −2 −4 1 0 −2 −4
3R +R2
−3 2 4 12 −−1−−→ 0 2 −2 0
2 −3 4 −3 2 −3 4 −3
Add −2R1 to R3 :
1 0 −2 −4 1 0 −2 −4
−2R1 +R3
0 2 −2 0 − −−−−→ 0 2 −2 0
2 −3 4 −3 0 −3 8 5
Multiply R2 by 12 :
1 0 −2 −4 1
R2
1 0 −2 −4
0 2 −2 0 −2−→ 0 1 −1 0
0 −3 8 5 0 −3 8 5
Add 3R2 to R3 :
1 0 −2 −4 1 0 −2 −4
3R2 +R3
0 1 −1 0 − −−−→ 0 1 −1 0
0 −3 8 5 0 0 5 5
Multiply R3 by 15 :
1 0 −2 −4 1
R3
1 0 −2 −4
0 1 −1 0 −5−→ 0 1 −1 0
0 0 5 5 0 0 1 1
We can continue row reducing but the row reduced augmented matrix is in triangular form.
So now use back substitution to solve. The linear system associated to the row reduced