Lecture Notes
Lecture Notes
Elisa Bellah
Preface vii
iii
iv Contents
Linear algebra is the study of linear equations, vectors, vector spaces (which gen-
eralize “flat spaces” like lines and planes), and linear transformations (which are
functions between vector spaces which preserve linearity). The beauty of linear
algebra lies in the interplay between these objects: moving between algebraic and
geometric perspectives allows us to leverage the strengths of one to deepen our
understanding of another.
This course will focus on the fundamentals of linear algebra in Euclidean space. Fo-
cusing our study on Euclidean space allows the theory to develop naturally. We will
use geometric intuition from familiar two- and three-dimensional settings to build
“higher-dimensional” spaces by carrying forward formalized versions of properties
we observe. In the next course, MAT224, you will take this abstraction further,
removing the notion of vectors from Euclidean spaces entirely.
Acknowledgments. These lecture notes have been shaped over multiple iter-
ations of this course, and have benefited from the valuable feedback of students,
TAs, and colleagues over the semesters. A special thank you to Noha ElGarem who
provided detailed feedback on a previous iteration of these notes, and wrote many
of the Lecture Activity and Chapter Exercise solutions. I would also like to thank
the authors of the listed additional resources for providing materials that inspired
portions of this text. Any errors or omissions are my own.
vii
viii Preface
How to use these notes. As a living document, these notes will continue to
evolve throughout the semester. Chapters which are currently under development
will be added to this public document as the course progresses. In the (hope-
fully rare) occasion that a section needs to be edited after it has been posted, an
announcement of the changes will be made on Quercus.
Free resources:
(1) 3Blue1Brown, Linear Algebra.
- Builds geometric intuition with helpful visualizations.
(2) Pugh, Linear Algebra Lecture Videos.
- Lecture videos from MAT188 taught by UofT professor Mary Pugh
- Excellent speaker with clear and insightful exposition
(3) Strang, Linear Algebra Video Lectures.
- Lecture videos from MIT professor Gilbert Strang
- Another good resource for students who respond well to lecture.
(4) Siefken, Linear Algebra: MAT223 Workbook. Available on Quercus.
- Down-to-earth presentation of material with concrete examples.
(5) Alayont and Schlicker, Linear Algebra and Applications.
- Good for extra practice problems.
(6) Margalit and Rabinoff, Interactive Linear Algebra
- Consise presentation of material, interactive examples.
(7) Johnston, Introduction to linear and matrix algebra.
- Logical presentation of material, clear writing.
(8) Axler, Linear Algebra Done Right.
- Abstract presentation, often used as a resource for MAT224.
Paid resources (suggest you find used copies, or search for pdfs):
(1) Poole’s Linear Algebra: A Modern Introduction
- Concise account of material with clear writing.
(2) Strang’s Introduction to Linear Algebra
-Well-regarded textbook, accompanies lectures from item (6) above.
Preface ix
List of Notation. The following list can be used as a quick reference for nota-
tion that appears in these notes.
∈ is an element of
∀ for all
∃ there exists
Eλ the λ-Eigenspace
x − y + 2z + w = 4
Our goal in this chapter is to develop the mathematics needed to solve any system
of linear equations. Before we do this, let’s look at a few modeling examples to
motivate the types of problems these systems can represent.
1
2 1. Systems of Linear Equations
Lecture Activity 1.1. Find a system of linear equations that models each
of the problems below.
P1. Blending Problems arise in contexts where several inputs are combined
to produce a final product with specific desired properties. Given the
characteristics of each input, the goal is to determine how much of each
input is needed to meet the target requirements.
Suppose you are planning a meal using three foods. Each unit of food
contains a different combination of protein, carbohydrates, and fat, as
shown below:
Food Protein (g) Carbs (g) Fat (g)
Food A 2 3 1
Food B 1 1 2
Food C 4 2 3
If you want your meal to contain exactly 30 grams of protein, 25
grams of carbs, and 20 grams of fat, how many units of each food
should you include in your meal?
In Lecture Activity 1.1 you may have been able to solve the systems using “ad-
hoc” methods. This is fine for small examples, but is not feasible in real-world
application where the size of our systems could be very large. In the following
1.2. The Matrix Representation of a Linear System 3
section, we introduce some notation which will help us develop a systematic method
to handle any system of linear equations.
We can record the important information about this system in an array as follows
1 −1 −1 1
2 −3 −1 3
−1 1 −1 −3
Observe that the first three columns of this array correspond to the coefficients
of our variables x, y and z for each of our three equations, and the last column
corresponds to the constant on the right-hand side of our linear equations. This
array is called a matrix, and can be used as a bookkeeping device to help us solve
systems of linear equations. Let’s give some formal definitions.
Definition 1.5. A matrix is any rectangular array of quantities or expressions.
The quantities or expressions in a matrix are called its entries. If a matrix has m
rows and n columns, then we call this an m × n matrix.
In this class, our matrices will typically contain real number entries (or sometimes
variables working as placeholders for real number entries). Matrices are often writ-
ten using soft brackets, such as in the 2 × 2 matrix below
1 2
0 −3
or by using hard brackets, such as in the 3 × 2 matrix below
0 π
3 2 .
1 7
We’ll be using soft brackets throughout these notes, but either one is perfectly fine.
Definition 1.6. Consider a general system of linear equations
a x + a x + ··· + a x = b
11 1 12 2 1n n 1
a21 x1 + a22 x2 + · · · + a2n xn = b2
..
.
am1 x1 + am2 x2 + · · · + amn xn = bm .
4 1. Systems of Linear Equations
Recall that the last column of an augmented matrix corresponds to the constant
coefficients of the corresponding system. This correspondence between systems of
linear equations and matrices is an important idea we’ll revisit many times through-
out the course.
We could apply (E3) to replace the third equation with the sum of the first and
third equations to obtain the new system of linear equations
x−y−z =1
(1.2) 2x − 3y − z = 3
−2z = −2
Observe that Systems (1.1) and (1.2) are equivalent (that is, they have the same
solution sets), but System (1.2) is simpler to solve since we’ve isolated one of our
variables.
Let’s look at this elementary operation with our new book keeping device. System
(1.1) has augmented matrix
1 −1 −1 1
2 −3 −1 3
−1 1 −1 −3
6 1. Systems of Linear Equations
Note that replacing the third equation with the sum of the first and third equations
is identical to replacing the third row of the augmented matrix above with the sum
of the first and third row, which yields
1 −1 −1 1
2 −3 −1 3 .
0 0 −2 −2
Note that this is precisely the augmented matrix for System (1.2).
More generally, our three elementary operations (E1), (E2), and (E3) can be viewed
as operations on the rows of the corresponding augmented matrix. We define the
following.
Definition 1.11. The elementary row operations are defined as follows:
(ER1) Interchange two rows;
(ER2) Replace a row by a nonzero scalar multiple of itself.
(ER3) Replace one row by the sum of that row and a scalar multiple of another
row;
We say that two matrices A and B are row equivalent if one can be obtained
from the other by a sequence of elementary row operations. In this case, we write
A ∼ B.
Noting again that applying an elementary row operation is the same as applying
an operation to a system of linear equations, which yields an equivalent system of
linear equations, we obtain the following key result:
Theorem 1.12. If two matrices are row equivalent, then the system of linear equa-
tions they represent are equivalent (that is, have the same solution sets).
In short order, we’ll see that these three elementary operations are enough to solve
any system of linear equations. To do this, let’s first think about which systems of
linear equations are “simplest” to solve.
Lecture Activity 1.2. Find all solutions to the the system of linear equa-
tions that have the following augmented matrices
1 1 1 1
P1. 0 1 −1 1
0 0 2 2
0 2 −1 1
P2.
0 0 0 1
2 2 1 2
P3.
0 0 3 6
1.4. Echelon Forms of a Matrix 7
In Lecture Activity 1.2, we were either able to directly detect that the system had
no solutions, or we were able to solve the system using back substitution. In the
latter case, we were able to carry this method through because each of the equations
in our system had at least one less variable than the equation above it. This feature
gave the corresponding augmented matrices an “inverted staircase” pattern. Let’s
give some definitions to make sense of this pattern more carefully.
Definition 1.13. The pivot of a row in a matrix is the leftmost nonzero entry in
that row.
Example 1.14. The matrix
0 1 −1 1
A = 0 0 0 2
3 0 1 3
has pivot 1 in the first row, 2 in the second row, and 3 in the third row.
Definition 1.15. A matrix is in row echelon form if
(1) all rows consisting only of zeros are at the bottom, and
(2) the pivot of each nonzero row in the matrix is in a column to the right of the
pivot of the row above it.
Definition 1.16. A matrix is in reduced row echelon form if
(1) the matrix is in echelon form,
(2) the pivot in each nonzero row is 1, and
(3) each pivot is the only nonzero entry in its column.
So, one way to solve any system of linear equations is to find an equivalent system
whose augmented matrix is in (reduced) row echelon form (reduced row echelon
form simplifies the calculation by leaving everything in our matrix, but you can
use back substitution on either form). In the next section, we show that this can
always be done.
Let’s first look at an example to convince ourselves of this result. For convenience,
we’ll use the following shorthand to notate our elementary operations:
Ri ↔ Rj : interchange the ith and jth rows;
cRi : replace row i by row i times the nonzero constant c;
Ri + cRj : replace row i with row i plus the constant c times row j (note that
we’ve written the row which is being replaced first in the operation).
Example 1.19. Let
1 1 2 1
A = 1 3 6 1
2 4 8 2
Our first goal will be to get A into row echelon form. There are no rows of zeros,
so let’s look at the pivots of A, given in bold-face below
1 1 2 1
A = 1 3 6 1 .
2 4 8 2
Since position (1, 1) has a pivot, we cannot have any other pivots in the first column
of the rows below. We can use the pivot in the (1, 1) position to get rid of the other
pivots in that first column as follows:
1 1 2 1
A ∼ 0 2 4 0 , via R2 − R1
2 4 8 2
1 1 2 1
∼ 0 2 4 0 , via R3 − 2R1
0 2 4 0
1.5. Gauss-Jordan Elimination 9
We now repeat the process above with our new matrix, which has pivots given in
bold-face below
1 1 2 1
0 2 4 0
0 2 4 0
The pivot in position (1, 1) does not have any pivots in the rows below, so there’s
nothing left to do here. However, we have a pivot in the (2, 2) position, and so
we should not have any pivots in the second column of the rows below. We can
eliminate the pivot in the (3, 2) position by using the pivot in the row above, as
follows
1 1 2 1 1 1 2 1
0 2 4 0 ∼ 0 2 4 0 , via R3 − R2
0 2 4 0 0 0 0 0
and we see that our matrix is now in row echelon form. Next, let’s get our matrix
into reduced row echelon form. The matrix above has pivots given in bold-face
below
1 1 2 1
0 2 4 0
0 0 0 0
The pivot in the (1, 1) entry is the only nonzero entry in its column, so there’s
nothing to do here. However, the pivot in the (2, 2) entry has nonzero entries in its
column. We can use the pivot to eliminate the other pivots in the second column
as follows
1 1 2 1 1 0 0 1
0 2 4 0 ∼ 0 2 4 0 , via R1 − 1 R2
2
0 0 0 0 0 0 0 0
Finally, we need to make all of our pivots equal to 1, which we can achieve by
performing the operation 12 R2 to the second row. Putting this all together, we get
1 0 0 1
A ∼ 0 1 2 0
0 0 0 0
which is a matrix in reduced row echelon form, as desired.
Remark 1.20. There are many ways to reduce the matrix above. For example, we
could have first divided the third row by 2, and then proceeded similarly, to simplify
our calculations. In the proof below, we give a complete algorithm to prove Gauss-
Jordan for an arbitrary matrix A. However, it’s often easier to allow yourself some
flexibility when row reducing a matrix. Instead of following the algorithm below,
we suggest using the following general principles:
(1) First, find a matrix in row echelon form that’s row equivalent to your matrix.
To achieve this, eliminate pivots as needed using the pivots in the rows above.
(2) Once your pivots are in the correct location (i.e. your matrix is in row echelon
form), use the pivot in each row to eliminate all other pivots in its column.
(3) Divide your row by the appropriate scalar to make your pivots equal to 1.
(4) Whenever it makes sense, move rows of zeros to the correct location.
10 1. Systems of Linear Equations
(5) If you find yourself at a step where you can eliminate many entries at once,
do that (even if it takes you “off-algorithm”)
The uniqueness of the matrix in the Theorem 1.18 allows us to define the following.
Definition 1.21. If A is row equivalent to a matrix X which is in reduced row
echelon form, we call X the reduced row echelon form of A, and write
rref(A) = X.
The best way to become comfortable with this process is through practice, so let’s
look at one more example together.
Proof of Theorem 1.18. Suppose that A is an m×n matrix. Then, the following
algorithm will give us a matrix which is row equivalent to A and in reduced row
echelon form.
Step 1: Move all rows of zeros to the bottom. Suppose that A has a row of zeros in
row i where i ̸= m. Letting j be the largest index so that row j is not a row of zeros,
interchange Rows i and j. Repeating this process for all rows gives a row equiv-
alent matrix A1 so that all rows consisting entirely of zeros are at the bottom of A1 .
Step 2: Move pivots. For all i < j so that the pivot in Rj is in a column to the left
of the pivot in Ri in A1 , interchange row i with row j. This gives a row equivalent
matrix A2 so that all pivots are either to the right or below of the pivots in columns
above it. Furthermore, A2 still has all rows of zeros at the bottom of the matrix.
Step 3: Find a matrix in row echelon form. For all i, j so that the pivot in row
i is in the same column as the pivot in row j in A2 , perform the row operation
Rj − aj /bi Ri , where aj is the pivot in row j and bi is the pivot in row i. This gives
a row equivalent matrix A3 in row echelon form.
Step 4: Make all pivots equal to 1. For all rows Ri containing a pivot ai in A3 ,
replace Ri with (1/ai )Ri . This gives a row equivalent matrix A4 that is still in row
echelon form, and where every pivot is equal to 1.
Step 5: Remove nonzero nonpivot entries from pivot columns. Finally, letting ai be
the pivot in row i, if there exists a nonzero entry bi in position (j, i), that is in the
jth row and ith column, replace Rj with Rj − abii Ri . If necessary, repeat previous
1.5. Gauss-Jordan Elimination 11
Next, we show that the matrix constructed above is unique. To do this, we will
induct on the number of columns of A (see Appendix A for a discussion on proof
by induction). For the base case, observe that there are only two m × 1 matrices
in reduced row echelon, given by
0 1
0 0
.. and .. .
. .
0 0
If these matrices are row equivalent, then so are
0 0 1 0
0 0 0 0
and .. .
..
. .
0 0 0 0
But, the first matrix is the augmented matrix for a system of linear equations where
x1 can be equal to any real number, while the second matrix is the augmented ma-
trix for a system of linear equations where x1 = 0. That is, these systems do not
have the same solution sets, and so the matrices above cannot be row equivalent
by Theorem 1.12.
Next, suppose that the result holds for any m × k matrix where k < n for an integer
n ≥ 1. Let A be m × n, and suppose that A ∼ B and A ∼ C where B and C are
both in reduced row echelon form. Write
b11 b12 · · · b1n c11 c12 · · · c1n
b21 b22 · · · b2n c21 c22 · · · c2n
B= . and C = .. .
. .. . .. .. ..
.. .. ..
. . . . .
bm1 bm2 ··· bmn cm1 cm2 ··· cmn
For a contradiction, suppose that B ̸= C. Let B ′ be the matrix obtained by deleting
the nth column from B, and similarly let C ′ be the matrix obtained by deleting
the nth column from C. Observe that B ′ and C ′ are still in reduced row echelon
form, and so by induction we have B ′ = C ′ . That is, the entries of B and C are
equal except for possibly the last column. Since we’ve assumed B ̸= C we must
have bin ̸= cin for some i ∈ {1, . . . , m}. Let ℓ be the smallest such integer. Now,
consider the systems of linear equations which have B and C as their coefficient
matrices, respectively
b x + b x + ··· + b x = 0
11 1 12 x 1n n
b21 x1 + b22 x2 + · · · + b2n xn = 0
..
.
bm1 x1 + bm2 x2 + · · · + bmn xn = 0,
12 1. Systems of Linear Equations
c x + c x + ··· + c x = 0
11 1 12 x 1n n
c21 x1 + c22 x2 + · · · + c2n xn = 0
..
.
cm1 x1 + cm2 x2 + · · · + cmn xn = 0.
We saw an example of how to handle step (3) in Activity 1.3. We give a few more
definitions to algorithmatize this step further.
Definition 1.23. A system of linear equations is called consistent if it has at
least one solution. If the system has no solutions, it is called inconsistent.
Definition 1.24. Let C be the coefficient matrix for a consistent system of linear
equations in variables x1 , . . . , xn .
(1) We say that xi is a basic variable for the system if the ith column of rref(C)
has a pivot.
(2) We say that xi is a free variable of the system if the ith column of rref(C)
does not have a pivot.
In the next section, we’ll see that a system has a free variable if and only if the
system has infinitely many solutions (see Theorem 1.27). In this case we can pa-
rameterize the solution set using our free variables. We demonstrate this method
by example below.
1.5. Gauss-Jordan Elimination 13
Recall from Example 1.19 that augmented matrix for this system
1 1 2 1
A = 1 3 6 1
2 4 8 2
has reduced row echelon form
1 0 0 1
rref(A) = 0 1 2 0 .
0 0 0 0
Since rref(A) does not have a pivot in the last column, it’s consistent (i.e. has a
solution), and furthermore the coefficient matrix of our system C satisfies
1 0 0
rref(C) = 0 1 2 .
0 0 0
Note that the pivots of rref(C) are in columns 1 and 2, and so x and y are basic
variables, while z is free. Let’s look at what this tells us about our solution set.
The system of linear equations that rref(A) represents is given by
x=1
y + 2z = 0
0=0
Now, if we let z (our free variable) be any real number then our solution set can
be described parametrically as {(1, −2z, z) : z ∈ R}. Note that the existence of
a free variable guarantees our solution set has infinitely many solutions, and those
solutions may be parameterized by the free variables.
Remark 1.26. It is also completely valid for us to instead choose y to vary over
the real numbers instead, and have z be controlled by y. In this case, our solution
set could be described parametrically as {(1, y, −y/2) : y ∈ R}. We’ll see later on
that it’s convenient to choose our free variables as the variables corresponding to
the non-pivot columns of our coefficient matrix, as demonstrated in the example
above, but you’re welcome to describe your solution sets in whatever way makes
the most sense to you.
Lecture Activity 1.6. Let A be the matrix from Lecture Activity 1.5, and
consider the system of linear equations in variables x, y, z, w which has A as
its augmented matrix.
P1. Determine the free variables and basic variables of the system.
P2. Give a parametric description of the solution set to this system.
14 1. Systems of Linear Equations
(2) Suppose that a system of linear equations has augmented matrix A with
1 0 2
rref(A) = 0 1 3 .
0 0 0
Note that rref(A) does not have a pivot in the last column, and so we do not
end up with an equation as in the previous part. Also note that the coefficient
matrix of this system C satisfies
1 0
rref(C) = 0 1 ,
0 0
which has a pivot in every column. This tells us that all of our variables
are basic. In other words, we have no free variables, and hence no choice for
solutions. We see that this system has exactly one solution given by x = 2
and y = 3.
(3) Suppose that a system of linear equations has augmented matrix A with
1 2 −1 0 1
rref(A) = .
0 0 0 1 0
Note that rref(A) does not have a pivot in the last column, and so the system
is consistent (i.e. has a solution). Also note that the coefficient matrix of this
1.6. The Number of Solutions to Systems of Linear Equations 15
system C satisfies
1 2 −1 0
rref(C) = ,
0 0 0 1
which does not have a pivot in the second or third column. Hence, when we
write the parametric form for the solution set to this system, the variables
x2 , x3 will be free (as seen in Example 1.25). That is, we can find a solution
for our system for any choice of real numbers for x2 and x3 . Hence, the system
has infinitely many solutions.
The proof of Rouché-Capelli rests on our observations from the previous example.
We include the proof below for completeness.
For part (1), suppose that rref(A) has a pivot in the last column. Then, rref(A)
contains a row of the form
0 ··· 0 1
which represents the linear equation 0 = 1. Since this equation can never have
a solution, the system of linear equations represented by A has no solutions, as
needed. Now, since rref(C) either contains a pivot in every column or not, the case
where rref(A) does not have a pivot in every column will be handled in parts (2)
and (3).
For part (2), suppose that rref(A) does not have a pivot in the last column, and
every column of rref(C) has a pivot. By Chapter Exercise P1.1 observe that we
must have m ≥ n, and so rref(A) is of the form
1 0 · · · 0 a1
0 1 · · · 0 a2
.. .. . . ..
,
. .
. .
0 0 · · · 1 an
0 0 ··· 0 0
where the bold-face 0’s indicate that the remaining n − m rows are rows of zeros.
Hence, our system has one solution, given by (x1 , . . . , xn ) = (a1 , . . . , an ). Con-
versely, if our system of linear equations has exactly one solution (a1 , . . . an ) then
our system is equivalent to
x = a
1 1
x2 = a2
..
.
xn = an
16 1. Systems of Linear Equations
and so
1 0 · · · 0 a1
0 1 · · · 0 a2
A ∼ ... ... . . . ... .. .
.
0 0 · · · 1 an
0 0 ··· 0 0
Furthermore, noting that the elementary row operations preserve columns, we get
1 0 ··· 0
0 1 · · · 0
C ∼ ... ... . . . ... .
0 0 · · · 1
0 0 ··· 0
Since the matrices above are in reduced row echelon form, then rref(A) and rref(C)
are as needed.
Finally, for part (3), suppose that rref(A) does not have a pivot in the last column,
and rref(C) has a column without a pivot. Then, either the variable xn is free, or
there must be two consecutive rows in rref(A) of the form
!
0 ··· 1 ··· * ··· ∗ ··· bi
,
0 ··· 0 ··· 0 ··· 1 · · · bi+1
where the bold-face 0 indicates possibly more than one zero entry in this row.
Supposing the jth column has no pivot, we see using back substitution that the
variable xj can be taken to be any real number, which gives a system with infinitely
many solutions, as needed. Conversely, if our system has infinitely many solutions,
then one of our variables must be free, which yields two consecutive rows in rref(A)
as above. □
Since every matrix either does or does not have a pivot in the last column, we
obtain the following corollary.
Corollary 1.29. Every system of linear equations either has no solutions, exactly
one solution, or infinitely many solutions.
Note that Corollary 1.29 is a special property of linear systems. For example, the
nonlinear system
x2 + y 2 = 1
(
(x − 1)2 + y 2 = 1
can be seen to have exactly two solutions.
Lecture Activity 1.7. Suppose that we’re given a set of n data points
that lie exactly on the graph of some unknown cubic function. What’s the
minimum number of points needed to guarantee there’s exactly one cubic
function passing through them? Explain your answer.
1.7. Intersections of Lines and Planes 17
Let’s look first at the two dimensional case. Note that two lines in R2 can either
be the same line, distinct and parallel, or distinct and not parallel
Let’s also look at the geometry of systems in three variables. Suppose that we have
three linear equations in three variables that correspond to three distinct planes in
R3 . In this case, we could have two of the planes being distinct and parallel, as in
the picture below
or no two of our planes are parallel, in which case our planes can intersect at a line
18 1. Systems of Linear Equations
or at a point
Again we see geometrically that these cases correspond to systems of linear equa-
tions which have no solutions, infinitely many solutions, or exactly one solution,
which matches what we found in our corollary to Rouché-Capelli.
Exercises
P1.1 Suppose that A is an m × n matrix. Show that rref(A) can have at most
min{m, n} pivots, where min{m, n} is the smallest of m and n; that is,
(
m if m ≤ n
min{m, n} =
n if m ≥ n.
P1.2 List all possible reduced row echelon forms of a 3 x 4 matrix with a pivot in
exactly two rows. Use ‘∗’ to denote entries which can be equal to any real
number. Make sure to justify how you know you’ve checked all possible cases.
P1.3 We call a system of linear equations homogeneous if the constant term in
each equation is zero. For example, the system
2x + 3y − z = 0
−x + 5y + 2z = 0
is homogeneous.
Exercises 19
⃗v
Observe that the displacement this vector represents can be understood by dis-
placement in the x-direction by 3 units and displacement in the y-direction by 2
units. We typically denote this by listing the
displacement
in each direction, and
3
then wrapping that list up in brackets: ⃗v = . This is called the standard
2
coordinate representation of ⃗v .
21
22 2. Vectors in Euclidean Space
Remark 2.1 (Unrooted Vectors). Note that in the example above, we drew our
vector starting from the origin (0, 0). However, it’s possible to shift a vector around
the plane without changing its direction and magnitude. That is, our vectors are
“unrooted”, meaning they can “start anywhere.” Recall that our vector ⃗v is the
vector which represents displacement in the x direction by 3 and displacement in
the y direction by 2, which can be represented as an arrow starting at (0, 0), or at
(−1, 1), or anywhere else we’d like
⃗v
⃗v
Remark 2.2 (Correspondence Between Vectors and Points). In this course, we’ll
be studying how certain sets of vectors behave together. One convenient way to do
this is to correspond each vector to a point. This will allow us to think of sets of
vectors as familiar geometric objects.
x
Our correspondence will associate each vector in R2 to the point (x, y) in R2 .
y
Graphically, we can visualize this as our vectors corresponding to the point the tip
sits at when rooted at the origin. In the example below, we see that the vector ⃗v
corresponds to the point (3, 2), which is simpler to see visually when we root ⃗v at
the origin (0, 0).
⃗v
⃗v (3, 2)
x
one block east and three blocks north. Find the standard coordinate
representation of your total displacement.
P2. On the graph below, sketch the path you would take by following the
directions from P1. On the same graph, sketch the total displacement
vector you found in P1.
P3. Suppose that someone gave you the following directions: (1) from your
starting point, walk v1 blocks east and v2 blocks north, then (2) walk
w1 blocks east and w2 blocks north. Find the standard coordinate rep-
resentation of your total displacement. In this problem, v1 , v2 , w1 , w2
are unknown real numbers.
Lecture Activity 2.2 (Flight Navigation I). You are piloting an airplane
equipped with two fixed-direction thrusters that assist in maneuvering. Each
thruster provides thrust in a specific, constant direction and can be fired
forward or in reverse for any number of seconds. In this scenario, we assume
the airplane is already at cruising altitude, and the two thrusters only affect
horizontal position.
• Firing Thruster A for one second in the forward direction moves the
airplane 17 meters East and 7 meters North; firing Thrusters A for one
second in the backward direction moves the airplane 17 meters West
and 7 meters South.
• Firing Thruster B for one second in the forward direction moves the
airplane 5 meters East and 18 meters North; firing Thruster B for one
second in the backward direction moves the airplane 5 meters West
and 18 meters South.
In this problem, we explore what these thruster directions imply about the
airplane’s maneuverability at its current fixed altitude.
P1. Suppose you’re instructed to reach a waypoint located 235 meters East
and 33 meters North of your current position. Can you reach the
waypoint using only Thruster A or only Thruster B? If yes, determine
how many seconds you need to fire the thruster to reach the waypoint.
If not, explain why not.
2.3. Linear Combinations and Spans 25
P2. Can you reach the waypoint from P1 using a combination of both
thrusters? If yes, determine how many seconds you need to fire each
thruster to reach the waypoint. If not, explain why not.
P3. Can you reach every possible waypoint at your current elevation (i.e.,
in the same horizontal plane) using a combination of Thrusters A and
B? Explain your answer.
In Lecture Activity 2.2, we were able to solve the given vector equations by cor-
responding them to a system of linear equations. Note that for each system of
linear equations, we also have a corresponding vector equation. We summarize this
observation below.
Proposition 2.7. The vector equation
x1⃗v1 + x2⃗v2 + · · · + xn⃗vn = w
⃗
has the same solution set as the system of linear equations with augmented matrix
⃗v1 ⃗v2 · · · ⃗vn w ⃗ .
We include the proof of this Proposition below for completeness.
Lecture Activity 2.3. Find the augmented matrix for the system of linear
equations that has the same solution set as the following vector equations.
Then, find all solutions to the vector equation.
1 −1/2 3
P1. x +y =
2 5 4
1 3 2
P2. x 1 + y 4 = 5
1
1 1
2 5 −1 4
P3. x +y +z =
1 3 0 2
Let’s add some terminology to the vector equations we encountered in the Lecture
Activity 2.1.
Definition 2.8. A linear combination of vectors ⃗v1 , ⃗v2 , . . . , ⃗vn in Rm is a vector
of the form
w⃗ = c1⃗v1 + c2⃗v2 + · · · + cn⃗vn
where the c1 , c2 , . . . , cn are scalars called the coefficients of the linear combina-
tion.
Given a collection of vectors ⃗v1 , . . . , ⃗vn in Rm , we want to be able to:
(1) Determine whether a fixed vector w
⃗ is a linear combination of ⃗v1 , . . . , ⃗vn , and
(2) Describe the set of all linear combinations of the vectors ⃗v1 , . . . , ⃗vn .
Proposition 2.7 resolves the first problem, since we have a method to solve any
system of linear equations from our work in Chapter 2. The second problem will
take a little more work. We define the following.
Definition 2.9. The span of vectors ⃗v1 , ⃗v2 , . . . , ⃗vn in Rm is the set
Span(⃗v1 , . . . , ⃗vn ) = {c1⃗v1 + · · · + cn⃗vn | c1 , c2 , . . . , cn ∈ R}.
That is Span(⃗v1 , . . . , ⃗vn ) is the set of all linear combinations of vectors ⃗v1 , . . . , ⃗vn .
Let’s revisit our flight navigation problem.
Lecture Activity 2.4 (Flight Navigation II). You are piloting an air-
plane equipped with four fixed-direction thrusters that assist in maneuver-
ing. Each thruster provides thrust in a specific, constant direction and can
be fired forward or in reverse for any number of seconds.
• Firing Thruster A for one second in the forward direction moves the
airplane 10 meters East, 9 meters North, and 2 meters Up. Firing
Thruster A for one second in the backward direction has the opposite
effect; that is, moves the airplane 10 meters West, 9 meters South, and
2 meters Down.
• Firing Thruster B for one second in the forward direction moves the
airplane 4 meters East, 7 meters North, and 1 meters Up. Firing B in
reverse has the opposite effect.
2.4. Linear Dependence and Independence 27
• Firing Thruster C for one second in the forward direction moves the
airplane 0 meters East, 2 meter North, and 3 meter Up. Firing C in
reverse has the opposite effect.
• Firing Thruster D for one second in the forward direction moves the
airplane 2 meter East, 5 meters South, and 0 meters Up. Firing D in
reverse has the opposite effect.
In this problem, we will explore what these thruster directions imply about
the airplane’s maneuverability in 3 dimensional space.
P1. Show that you can reach any waypoint using all four thrusters.
P2. Show that you can reach any waypoint using only Thrusters A, B, C.
P3. Do you think it’s possible to reach any waypoint using only two
Thrusters?
Let ⃗a, ⃗b, ⃗c, d⃗ be the vectors associated to Thrusters A, B, C and D from Lecture
Activity 2.4, respectively. In our investigation, we found that d⃗ ∈ Span(⃗a, ⃗b, ⃗c) and
so including Thruster D was “redundant”. That is, Thruster D didn’t really help
with our navigation, since we could just use a combination of Thrusters A, B and
C to reach the same waypoints. Understanding redundancies of this type will turn
out to be key to understanding spans. Let’s add a new definition to help develop
this theory further.
Definition 2.10. A set of vectors {⃗v1 , ⃗v2 , . . . , ⃗vn } in Rm is called linearly de-
pendent if at least one of the vectors is a linear combination of the others. That
is, for at least one i ∈ {1, . . . , n} we have
⃗vi ∈ Span(⃗v1 , ⃗v2 , . . . , ⃗vi−1 , ⃗vi+1 , . . . , ⃗vn ).
Otherwise, the vectors are called linearly independent.
Checking for linear dependence using the definition can lead to long calculations.
The following result will simplify this calculation significantly.
Theorem 2.11. A set of vectors {⃗v1 , ⃗v2 , . . . , ⃗vn } in Rm is linearly dependent if and
only if the vector equation
x1⃗v1 + x2⃗v2 + · · · + xn⃗vn = ⃗0
28 2. Vectors in Euclidean Space
has a “nontrivial” solution; that is, a solution other than (x1 , x2 , . . . , xn ) = (0, 0, . . . , 0).
Proof. Suppose that the set {⃗v1 , ⃗v2 , . . . , ⃗vn } is linearly dependent. By relabeling,
we may assume that ⃗v1 ∈ Span(⃗v2 , . . . , ⃗vn ). So, there are real numbers c2 , . . . , cn
so that
⃗v1 = c2⃗v2 + · · · + cn⃗vn .
Subtracting both sides by ⃗v1 gives
−⃗v1 + c2⃗v2 + · · · + cn⃗vn = ⃗0.
Hence, the vector equation
x1⃗v1 + x2⃗v2 + · · · + xn⃗vn = ⃗0
has (x1 , . . . , xn ) = (−1, c2 , . . . , cn ) as a solution. Since x1 = −1 ̸= 0, this solution
is nontrivial, as needed.
Lecture Activity 2.6. Use Theorem 2.11 to determine which of the fol-
lowing sets are linearly dependent and which are linearly independent.
1 −1 −1
P1. S = 2 , 4 , 0
−3 0 2
1 3 −1
P2. T = 1 , 1 , 2
0 2 0
1 1 0 1
0 0 0 −1
P3. U = , , ,
0 1 1 0
0 0 1 0
Proof. Suppose that the set {⃗v1 , ⃗v2 , . . . , ⃗vn } is linearly independent. Then, by
Theorem 2.11 the vector equation
x1⃗v1 + x2⃗v2 + · · · + xn⃗vn = ⃗0
only has the trivial solution. This equation has the same solution set as the system
of linear equations with augmented matrix
⃗v1 ⃗v2 · · · ⃗vn ⃗0 .
Since this equation has the trivial solution (x1 , x2 , . . . , xn ) = (0, 0, . . . , 0), it is
consistent. Hence, by Rouché-Capelli, the reduced row echelon form of the matrix
⃗v1 ⃗v2 · · · ⃗vn
must have a pivot in every column, as needed.
Conversely, suppose that the reduced row echelon form of the matrix
⃗v1 ⃗v2 · · · ⃗vn
has a pivot in every column. Then, by Rouché-Capelli, the system of linear equa-
tions with augmented matrix
⃗v1 ⃗v2 · · · ⃗vn ⃗0
only has one solution. Since (0, 0, . . . , 0) is always a solution to this equation, it
must be the only solution. So, the vector equation
x1⃗v1 + x2⃗v2 + · · · + xn⃗vn = ⃗0
only has the trivial solution. Therefore, by Theorem 2.11, the set {⃗v1 , . . . , ⃗vn } is
linearly independent. □
In the following Chapter, we’ll continue investigating our second motivating prob-
lem: how can we describe the span of a set of vectors?
Exercises
P2.1 True or False: For vectors ⃗u and ⃗v in R2 , if Span(⃗u, ⃗v ) = R2 then
Span(⃗u, ⃗u + ⃗v ) = R2 .
If true, provide a proof. If false, provide a counterexample and justify why
this is a counterexample.
⃗ in R3 , if Span(⃗u, ⃗v , w)
P2.2 True or False: For vectors ⃗u, ⃗v , w ⃗ = R3 then
⃗ = R3 .
Span(⃗u + ⃗v , ⃗v + w)
If true, provide a proof. If false, provide a counterexample and justify why
this is a counterexample.
P2.3 Give an example for each of the following, if possible. If it is not possible to
construct an example, explain why not.
(a) Three linearly independent vectors in R4 .
(b) Three linearly dependent vectors in R4 .
(c) Three linearly independent vectors in R2 .
30 2. Vectors in Euclidean Space
Vector Subspaces of Rn
If we use only one thruster, we see that we’re restricted to traveling along the
line pointing in that thruster’s direction. If we use two thrusters, we can argue
geometrically that we’re restricted to traveling in a plane. For example, we see
that Span(⃗a, ⃗b) gives the plane drawn below
31
32 3. Vector Subspaces of Rn
We can see that d⃗ is contained in this plane, which is why Thruster D doesn’t
contribute anything to our flight.
But when we include Thruster C, we get an extra direction that allows us to traverse
all of 3-D space
Observe in the examples above that our spans gave us either a line, a plane, or
all of R3 . One could use geometric reasoning to argue that the span of any set of
nonzero vectors in R3 is either a line, a plane, or all of R3 . However, in higher
dimensions, we don’t have geometric notions of lines and planes. In order to extend
3.1. Vector Spaces 33
Definition 3.1. A vector space (over the real numbers) is any set of vectors V
in Rn that satisfies all of the following properties:
(1) V is nonempty;
⃗ ∈ V we have ⃗v + w
(2) V is closed under vector addition: for all ⃗v , w ⃗ ∈V;
(3) V is closed under scalar multiplication: for all ⃗v ∈ V and c ∈ R we have
c⃗v ∈ V .
If V is a subset of Rn and is also a vector space, we call V a vector subspace of
Rn . In this case, we refer to Rn as the ambient space.
Lecture Activity 3.1. Determine which of the following sets are vector
subspaces of the given ambient space and which are not. Justify your answer.
P1. The subsets of R2 drawn below (note that the set S2 in the second
image is meant to extend infinitely in all directions)
S1 S2
S3 S4
34 3. Vector Subspaces of Rn
2 x
P2. The subset U of R defined by U = :x∈R
1
2x
P3. The subset V of R2 defined by V = :x∈R
0
x−y
P4. The subset W of R3 defined by W = x + y + 2z : x, y, z ∈ R
y+z
The following proposition tells us that the span of a set of vectors satisfies the “self
containment” properties that the Euclidean spaces satisfy.
Proposition 3.2. The span of any set of vectors in Rn is a vector subspace of Rn .
Proof. Suppose that V = Span (⃗v1 , ⃗v2 , . . . , ⃗vm ) for vectors ⃗v1 , ⃗v2 , . . . , ⃗vm in Rn .
Observe that ⃗0 ∈ V since we can write
⃗0 = 0⃗v1 + · · · + 0⃗vm ,
and so V is not empty. Next, take any ⃗v , w
⃗ in V . Then we can write
⃗v = a1⃗v1 + · · · + am⃗vm
⃗ = b1⃗v1 + · · · + bm⃗vm
w
for scalars ai , bi ∈ R and so
⃗ = (a1 + b1 )⃗v1 + · · · + (am + bm )⃗vm ∈ Span(⃗v1 , . . . , ⃗vm ).
⃗v + w
⃗ ∈ V and so V is closed under vector addition. Finally, for any scalar
Hence, ⃗v + w
c ∈ R we have
c⃗v = (ca1 )⃗v1 + · · · + (cam )⃗vm ∈ Span(⃗v1 , . . . , ⃗vm ).
Hence, c⃗v ∈ V and so V is closed under scalar multiplication. Therefore, V is a
vector space. To see that V is a subset of Rn , note that each ⃗vi ∈ Rn and since Rn
is closed under scalar multiplication we know that ci⃗vi ∈ Rn for all i = 1, . . . , m.
Hence,
⃗v = c1⃗v1 + · · · + cm⃗vm ∈ Rn
for all ⃗v ∈ V and so V ⊆ Rn . □
since V is a vector space. For the opposite set inclusion, take any ⃗v ∈ V . If
⃗v = ⃗vi ∈ B then certainly ⃗v ∈ Span(⃗v1 , ⃗v2 , . . . , ⃗vm ) by writing
⃗v = 0⃗v1 + · · · + 1 · ⃗vi + · · · + 0⃗vm .
So, suppose that ⃗v ̸∈ Span(⃗v1 , ⃗v2 , . . . , ⃗vm ). Since we chose our set B to be maximal
with respect to linear independence, the set {⃗v1 , ⃗v2 , . . . , ⃗vm , ⃗v } must be linearly de-
pendent. So, by Theorem 2.11 there exists a nontrivial solution (c1 , . . . , cm , cm+1 )
to the vector equation
(3.1) x1⃗v1 + · · · + xm⃗vm + xm+1⃗v = ⃗0.
Note that, if cm+1 = 0 then we would have a nontrivial solution (c1 , . . . , cm ) to the
vector equation
x1⃗v1 + · · · + xm⃗vm = ⃗0,
which contradicts the fact that B = {⃗v1 , . . . , ⃗vm } was chosen to be linearly inde-
pendent. So, we must have cm+1 ̸= 0. Plugging (c1 , . . . , cm , cm+1 ) into Equation
(3.1) gives
−cm+1⃗v = c1⃗v1 + c2⃗v2 + · · · + cm⃗vm ,
and so dividing by −cm+1 (which we can do since cm+1 ̸= 0) gives
−1
⃗v = (c1⃗v1 + c2⃗v2 + · · · + cm⃗vm ) .
cm+1
Hence, V = Span(⃗v1 , . . . , ⃗vm ), as needed. □
Observe that Theorem 3.3 gives us another method to detect whether a subset of
Rn is a vector space.
Lecture Activity 3.2. Show that the following sets are vector spaces by
finding a generating set. Compare with your work in Lecture Activity 3.1
2x
P1. V = :x∈R
0
x−y
P2. W = x + y + 2z : x, y, z ∈ R
y+z
3.2. Bases
In the flight navigation problem from Lecture Activity 2.4, we saw that the set
V = Span(⃗a, ⃗b, d)
⃗ described a plane in R3 , even though it was generated by three
vectors. The reason for this was that the vector d⃗ is a linear combination of the
others, and so the smaller set {⃗a, ⃗b} was sufficient to define the same space. This
highlights a key observation: to understand vector spaces, it is useful to find a
minimal spanning set. We define the following.
36 3. Vector Subspaces of Rn
Lecture Activity 3.3. Determine which of the following sets are bases
for R3 .
1 0 1
B1 = 1 , 1 , 2
1 1 2
1 0
B2 = 0 , 1
0 0
1 0 0
B3 = 0 , 1 , 0
0 0 1
1 1 0
B4 = 0 , 1 , 0
1 0 1
Observe that the bases for R3 in Lecture Activity 3.3 all contain three elements.
Let’s show that this is always the case.
Proposition 3.6. If B is a basis for R3 , then B contains three elements.
Proof. Let B be any basis for R3 . First, let’s show that B can contain at most
three elements. To see this, suppose that B = {⃗b1 , . . . , ⃗bd } contains d elements.
Since B is linearly independent, the vector equation
x1⃗b1 + x2⃗b2 + · · · + xn⃗bn = ⃗0
only has the trivial solution. This vector equation has the same solution set as a
consistent system of linear equation with coefficient matrix
A = ⃗b1 ⃗b2 · · · ⃗bd .
By Rouché-Capelli, we know that rref(A) must have a pivot in all d columns. Fur-
thermore, since ⃗bi ∈ R3 , we know that A has size 3 × d. Since a matrix can have at
most one pivot in every row, we must have d ≤ 3.
Next, let C = {⃗c1 , ⃗c2 , ⃗c3 } be a basis for R3 which is known to contain three elements
(note that such a basis exists by our work in Lecture Activity 3.3). For a contra-
diction, suppose that B = {⃗b1 , ⃗b2 } contains two elements. Since B is a basis, it is a
spanning set for R3 and so ⃗ci ∈ Span(B) for i = 1, 2, 3. So, we can write
⃗c1 = a1⃗b1 + a2⃗b2
3.2. Bases 37
+ x2 (a3⃗b1 + a4⃗b2 )
+ x3 (a5⃗b1 + a6⃗b2 )
+ (x1 a2 + x2 a4 + x3 a6 )⃗b2 .
But since B is a basis, the coefficients of the equation above must be equal to zero.
That is, we must satisfy the system of linear equations
x1 a1 + x2 a3 + x3 a5 = 0
x1 a2 + x2 a4 + x3 a6 = 0
which is a consistent system with coefficient matrix
a1 a3 a5
A= .
a2 a4 a6
But, since A has more columns than rows, rref(A) must have a column without a
pivot. Hence, by Rouché-Capelli, this system has infinitely many solutions. That
is, Equation (3.2) has a nontrivial solution. But this contradicts the fact that C is
a basis! So, we cannot have a basis for R3 containing two elements.
We leave it as an exercise to the reader to show that R3 cannot have a basis with
one element, and so B must contain exactly three elements, as needed. □
The fact that we need three basis elements for 3-D space is no accident, and should
match our geometric intuition. The following theorem will move us toward our
understanding of vector spaces as sets that “behave like” Euclidean space.
Theorem 3.7. Let V be a nonzero vector subspace of Rn with basis B. If B contains
d elements, then any other basis for V also contains d elements.
The proof of this Theorem will follow similarly to Proposition 3.6. While the follow-
ing proof is not required material for the course, interested students are encouraged
to read through it in detail.
Since {⃗c1 , . . . , ⃗ck } is also a basis for V , we know that this set is linearly independent.
So, the vector equation
But since {⃗b1 , . . . , ⃗bd } is a basis, this set is linearly independent, and so the coef-
ficients of ⃗b1 , . . . , ⃗bd in the equation above must all be equal to 0. This gives the
following system of linear equations
x a + x a + · · · + x a = 0
1 11 2 21 k k1
x1 a12 + x2 a22 + · · · + xk ak2 = 0
..
.
x1 a1d + x2 a2d + · · · + xk akd = 0.
Observe that if k > d then rref(A) would have a column without a pivot, and so
by Rouché-Capelli we would have a nontrivial solution to Equation 3.3. This con-
tradicts the fact that C is linearly independent, and so we must have k ≤ d.
Note that Proposition 3.3 guarantees every vector space V has a spanning set. In
the next section, we’ll show that every nonzero vector space in fact has a basis,
and hence the dimension is well-defined. Furthermore, we’ll develop a method to
find the basis for any given vector space. Before we do that, let’s make sure our
notion of dimension matches our expectations for Euclidean space. We define the
following.
Definition 3.9. The standard basis for Rn is the set E := {⃗e1 , ⃗e2 , . . . , ⃗en } where
⃗ei is the vector with 1 in the ith coordinate and 0 in all other coordinates. That is,
1 0 0
0 1 0
⃗e1 = . , ⃗e2 = . , . . . , ⃗en = . .
.. .. ..
0 0 1
Lecture Activity 3.4. Show that the standard basis E is a basis for Rn .
Conclude that dim(Rn ) = n.
Lecture Activity 3.5. In this problem we’ll find a basis for the vector
space W from Lecture Activities 3.1 and 3.2, defined by
x−y
W = x + y + 2z : x, y, z ∈ R .
y+z
P1. Use your work from Lecture Activity 3.2 to observe that we can write
W = Span(⃗u, ⃗v , w).
⃗
40 3. Vector Subspaces of Rn
P2. Let A = ⃗u ⃗v w
⃗ and observe that
1 0 1
rref(A) = 0 1 1 .
0 0 0
Use this calculation to show that w ⃗ ∈ Span(⃗u, ⃗v ).
P3. Use P2 to show that Span(⃗u, ⃗v , w)
⃗ = Span(⃗u, ⃗v ).
P4. Use your work in the previous parts to find a basis for W . Then, find
the dimension of W .
where the ⃗vi are vectors in Rm . If the nth column of rref(A) does not have a pivot,
then the vector ⃗vn is in Span(⃗v1 , ⃗v2 , . . . , ⃗vn−1 ).
as needed. □
V = Span(⃗v1 , . . . , ⃗vn ).
and let A = ⃗v1 · · · ⃗vn . If columns i1 , i2 , . . . , ik of rref(A) have a pivot, then
the set {⃗vi1 , ⃗vi2 , . . . , ⃗vik } is a basis for V . Furthermore, if rref(A) has k pivots, then
dim(V ) = k.
Proof. By relabeling, we may assume that rref(A) has a pivot in the first k
columns. If k = n then we’re done, so suppose that k < n. Then rref(A) does
not have a pivot in the last column, and hence by Lemma 3.10 we have
We claim that Span(⃗v1 , . . . , ⃗vn ) = Span(⃗v1 , . . . , ⃗vn−1 ). First, take any ⃗v ∈ Span(⃗v1 , . . . , ⃗vn ).
Then there are real numbers di ∈ R so that
⃗v = d1⃗v1 + · · · + dn−1⃗vn−1 + dn⃗vn
= d1⃗v1 + · · · + dn−1⃗vn−1 + dn (c1⃗v1 + · · · + cn−1⃗vn−1 )
= (d1 + c1 )⃗v1 + · · · + (dn−1 + cn−1 )⃗vn−1
∈ Span(⃗v1 , . . . , ⃗vn−1 ),
Hence, Span(⃗v1 , . . . , ⃗vn ) ⊆ Span(⃗v1 , . . . , ⃗vn−1 ). Conversely, take any w
⃗ ∈ Span(⃗v1 , . . . , ⃗vn−1 ).
Then, there are real numbers ai ∈ R so that
⃗ = a1⃗v1 + · · · + an−1⃗vn−1
w
= a1⃗v1 + · · · + an−1⃗vn−1 + 0⃗vn
∈ Span(⃗v1 , . . . , ⃗vn ).
Hence, Span(⃗v1 , . . . , ⃗vn−1 ) ⊆ Span(⃗v1 , . . . , ⃗vn ) and so we obtain the desired set
equality. Next, if k > 1 we can repeat the argument above n − k times to obtain
Span(⃗v1 , . . . , ⃗vn ) = Span(⃗v1 , . . . , ⃗vn−1 )
= Span(⃗v1 , . . . , ⃗vn−2 )
..
.
= Span(⃗v1 , . . . , ⃗vk ).
Thus, {⃗v1 , . . . , ⃗vk } is a generating set for V . Finally, note that
rref ⃗v1 · · · ⃗vk
has a pivot in every column, and so {⃗v1 , . . . , ⃗vk } is linearly independent, and hence
is a basis for V , which gives dim V = k. □
Lecture Activity 3.6. Find a basis for the following vector spaces, and
state their dimension.
2 1 0
P1. V = Span 1 , 0 , 1
−1 −1 1
1 3 1 7
0 0 1 2
P2. W = Span
2 , 6 , 1 , 12
1 3 1 7
Note that Theorem 3.11 gives us one strategy to find a basis for a vector space.
The following result tells us that if we know the dimension of a given vector space,
any set of linearly independent elements containing that many elements will yield
a basis.
Theorem 3.12. Let V be a vector space with dim V = d. If B is a linearly inde-
pendent subset of V containing d elements, then B is a basis for V .
42 3. Vector Subspaces of Rn
Lemma 3.13 will yield Theorem 3.12, and is scaffolded as a Chapter Exercise.
Observe that the trivial space only has one spanning set given by {⃗0}. Unfortu-
nately, this set is not linearly independent. Indeed, we see that the vector equation
x⃗0 = ⃗0
has the nontrivial solution x = 2, for example. Hence, the trivial space does not
have a basis. For convenience, we set the following convention.
Definition 3.15. We define the dimension of the trivial space to be equal to zero,
and we define a basis for the trivial space to be the empty set ∅ = {}.
Exercises
P3.1 Let B = {⃗v1 , ⃗v2 , . . . , ⃗vm } be a set of vectors in Rn . Show that if m > n then
the set B is linearly dependent. (Note: you may not use Lemma 3.13 for
this problem).
P3.2 Show that a vector space V is nonempty if and only if ⃗0 ∈ V .
P3.3 Determine which of the following sets W is a subspace of Rn for the indicated
value of n. If W is a subspace, provide a proof. If not, explain why not.
2x + y
(a) W = x − y : x, y ∈ R in R3
x+y
x+1
(b) W = : x ∈ R in R2
x−1
xy
(c) W = xz : x, y, z ∈ R in R3
yz
P3.4 Suppose that V and W are both vector subspaces of Rn . Let V + W be the
subset of Rn defined by
V + W = {⃗v + w
⃗ | ⃗v ∈ V and w
⃗ ∈ W }.
Show that V + W is a vector subspace of Rn
P3.5 True or False: if W and V are subspaces of Rn , then
W ∩ V := {⃗x ∈ Rn : ⃗x ∈ W and ⃗x ∈ V }
is a subspace of Rn . If true, provide a proof. If false, provide a counterexample
and justify why this is a counterexample.
P3.6 True or False: if W and V are subspaces of Rn , then
W ∪ V := {⃗x ∈ Rn : ⃗x ∈ W or ⃗x ∈ V }
is a subspace of Rn . If true, provide a proof. If false, provide a counterexample
and justify why this is a counterexample.
44 3. Vector Subspaces of Rn
P3.7 In this problem, we’ll see how to use Lemma 3.13 to prove Theorem 3.12.
Throughout the problem, we assume that V is a vector space with dim V = d
and that {⃗v1 , . . . , ⃗vd } is a linearly independent subset of V .
(a) Show that Span(⃗v1 , . . . , ⃗vd ) ⊆ V .
(b) Take any ⃗v ∈ V and consider the subspace W = Span(⃗v1 , . . . , ⃗vd , ⃗v ). Let
A = ⃗v1 ⃗v2 · · · ⃗vd ⃗v .
Show that if rref(A) does not have a pivot in the last column, then
⃗v ∈ Span(⃗v1 , . . . , ⃗vd ).
(c) Let A be the matrix from part (b). Show that if rref(A) has a pivot in
the last column, then dim(W ) > d.
(d) Use Lemma 3.13, along with your work in the previous parts, to conclude
that V = Span(⃗v1 , . . . , ⃗vd ).
(e) Explain how your conclusion from part (d) proves Theorem 3.12.
P3.8 Let V be a vector subspace of Rn . Show that if V contains a nonzero element,
then V contains infinitely many elements. Conclude that the trivial space is
the only finite vector subspace of Rn .
P3.9 Let V be a vector subspace of Rn of dimension 1 ≤ m < n and suppose that
B is a basis for V . Show that if ⃗v in Rn is not an element of V , then the set
B ∪ {⃗v } is linearly independent. (Note: you may not use Lemma 3.13 for
this problem).
P3.10 Let V be a vector subspace of Rn of dimension m ≥ 1. Show that any basis
B for V can be extended to a basis for Rn . That is, if B is a basis for V , show
that there exist a basis C for Rn with B ⊆ C.
P3.11 Let V and W be vector subspaces of R5 with V ∩ W = {⃗0}. Suppose that
V has basis {⃗v1 , ⃗v2 } and W has basis {w ⃗ 2 }. Find a basis for the vector
⃗ 1, w
space V + W , and justify how you know this is a basis.
P3.12 True or False: If V and W are vector subspaces of Rn , then
dim(V + W ) = dim(V ) + dim(W ).
If true, provide a proof. If false, provide a counterexample and justify why
this is a counterexample.
P3.13 Is it possible to find two vector subspaces V and W of R3 with V ∩ W = {⃗0}
so that dim V = dim W = 2? If it is possible, give an example and justify
that your example satisfies these conditions. If it is not possible, explain why
not.
Chapter 4
Linear Transformations
Observe that the matrix-vector product gives us a new way to write linear combi-
nations of vectors. Let’s practice using this new notation.
45
46 4. Linear Transformations
Lecture Activity 4.2. In the images below, we’ve plotted where the in-
dicated function sends the standard coordinate grid for R2 . What do you
notice?
2 1 x x + sin(y)
TA where A = F =
1 2 y y
√ √
2 −√ 2
x + y2
TB where B = √ G
x
=
2 2 y y
1 1
TC where C = x x + |y|
1 1 H =
y y
4.2. Linearity 47
4.2. Linearity
In the last section, we saw that a matrix defines a function between Euclidean
spaces, and through example we conjectured that these functions “preserve lines”.
Let’s explore the family of functions with this property. We define the following.
Definition 4.4. A function F : Rn → Rm is called linear if it satisfies the
⃗ ∈ Rn and scalars c ∈ R:
following two properties for all vectors ⃗v , w
(1) F (⃗v + w)
⃗ = F (⃗v ) + F (w),
⃗ and
(2) F (c⃗v ) = cF (⃗v )
Remark 4.5. Let’s make sure this is the right definition to capture our geometric
observations, staying in 2-dimensional space for clarity. Note that a line in R2 can
be written in vector form as L = {⃗ p + td⃗ : t ∈ R} as demonstrated in the image
below
L
d⃗
p⃗
Lecture Activity 4.3. Determine which of the following are linear trans-
formations. Give a formal justification for your answer by showing that the
function does or does not satisfy the conditions of Definition 4.4.
P1. F : R2 → R2 defined by
2
x x
F =
y y2
P2. G : R2 → R2 defined by
x x+y
G = .
y x
P3. TA : R2 → R2 where A = ⃗v1 ⃗v2 is any 2 × 2 matrix.
The following observation will formally capture our geometric observations from
Lecture Activity 4.2, and will generalize what we showed in P3 above.
48 4. Linear Transformations
Example 4.7. Our goal for the remainder of this section is to show that the
converse of Proposition 4.6 also holds. Let’s first look at an example where this
can be done without too much effort. Consider the function G : R2 → R2 from P2
of Lecture Activity 4.2. Observe that we can write
x x+y
G =
y x
x y
= +
x 0
1 1
=x +y
1 0
1 1 x
= .
1 0 y
4.2. Linearity 49
F (⃗x) = M⃗x
Remark 4.10. We will often use the notation MF to denote the defining matrix
of a linear transformation F . Observe that MTM = M and TMF = F .
Remark 4.11. Observe that we now have several representations for problems
with equivalent solution sets, as outlined in the diagram below.
Matrix transformation
Matrix-vector equation
x a
TA : R2 → R2 , 7→ ,
y b
1 1 x a
=
1 −1 y b
1 1
where A =
1 −1
Observe that TC appears to “compress” the domain space R2 down to a line. This
behavior is different from the other examples, where no such compression occurred.
In this section, we introduce some definitions that will help us distinguish between
these two kinds of transformations. These definitions will also allow us to extend
this geometric intuition to higher-dimensional spaces.
Let’s explore the behavior of our function TC more precisely. Observe that TC
sends many distinct points to the origin. For example, we have
1 0 2 0
TC : 7→ and 7→
−1 0 −2 0
a 0
and in fact TC : 7→ for any real number a. So, we see that all points
−a 0
on the line y = −x are “compressed” to the point ⃗0.
The following definition will help us capture this geometric feature of “compres-
sion”. Since you will likely encounter this definition in other contexts, we state it
in general for functions between arbitrary sets.
Definition 4.13. A function f : X → Y is called one-to-one (or injective) if
the following property holds: for every y ∈ Y , there is at most one input x ∈ X so
that f (x) = y. We often use the arrow f : X ,→ Y to indicate when a function is
injective.
P2. TB : R3 → R2 where
1 0 0
B= .
0 1 1
P3. TD : R2 → R3 where
1 0
D = 0 1 .
0 0
The following definition will help us capture this feature of “missing points” in the
codomain. Since you will likely encounter this definition in other contexts, we state
it in general for functions between arbitrary sets.
Definition 4.16. A function f : X → Y is called onto (or surjective) if the
following property holds: for every y ∈ Y , there is at least one input x ∈ X so
that f (x) = y. We often use the arrow f : X ↠ Y to indicate when a function is
surjective.
4.3. Injective and Surjective Functions 53
This result can be proven using a pivot argument similar to Theorem 4.14. However,
there’s a slightly more intuitive way to see this which we will discuss in the next
Chapter after we develop a little more machinery. We will omit the proof below
from our class discussion, but we record it here for completeness.
Conversely, suppose that rref(M ) does not have a pivot in every row. Then, the
last row of rref(M
) is a row of zeros, and hence we can find a vector ⃗y ∈ Rn so that
rref M ⃗y has a pivot in the last column, as needed. □
54 4. Linear Transformations
Lecture Activity 4.8. Use Theorems 4.14 and 4.17 to determine which of
the following functions are injective, surjective, or neither.
x
x
P1. F : R2 → R3 , 7→ y
y
0
x x−y
P2. G : R3 → R3 , y 7→ y + z
z x + z
x x−y
P3. H : R3 → R3 , y 7→ y + z
z z
4.4. Isomorphisms
We introduce one more general definition for an arbitrary function between sets.
Definition 4.18. A function f : X → Y is called bijective if it is both injective
and surjective.
Observe that if the sets X and Y are finite, a bijection can only exist between them
if they have precisely the same number of elements. This idea can be extended
to give a more nuanced way to discuss the “number” of elements in an infinite
set, called its cardinality. When we insist that our function satisfy the additional
property that it maps linearly between Euclidean spaces, we obtain an even stronger
result.
This proposition tells us that bijective linear functions can only map between “iden-
tical” Euclidean spaces. This idea applies to bijective linear maps between vector
spaces more generally. We define the following.
Definition 4.19. Let V be a subspace of Rn and W a subspace of Rm . An
isomorphism between V and W is any linear bijective map F : V → W . If an
isomorphism exists between two vector spaces, we say these spaces are isomorphic,
and we write V ∼
= W.
We include the proof of this result below for completeness, but note that the proof
is not required material for the course.
{F (⃗v1 ), . . . , F (⃗vd )} is a basis for W . To see that this set is linearly independent,
suppose that
x1 F (⃗v1 ) + · · · + xd F (⃗vd ) = ⃗0.
Since F is linear, this gives
⃗ = F (c1⃗v1 + · · · + cd⃗vd )
w
= c1 F (⃗v1 ) + · · · + cd F (⃗vd )
∈ Span(F (⃗v1 ), . . . , F (⃗vd )),
where the second equality follows by linearity of F . Hence, W = Span(F (⃗v1 ), . . . , F (⃗vd ))
and so the F (⃗vi ) form generating set. Hence, {F (⃗v1 ), . . . , F (⃗vd )} is a basis for W ,
and so dim(W ) = d.
{⃗v1 , . . . , ⃗vd }
F (x1⃗v1 + · · · + xd⃗vd ) = x1 w
⃗ 1 + · · · + xd w
⃗ d.
Exercises
im(F ) := {F (⃗x) | ⃗x ∈ Rn }.
57
58 5. [DRAFT - subject to revision] Fundamental Subspaces
Domain Rn Codomain Rm
F Im F
ker F
⃗0
That is, the kernel is the set of vectors in the domain Rn that are mapped to the
zero vector, and the image is the set of elements in the codomain that are mapped
to by F , as represented in the graphic below.
The following result generalizes our observations from Lecture Activity 5.1. We
will leave the proof of this result as a chapter exercise.
In Lecture Activity 5.2, we saw that our kernel and image calculations involved the
defining matrix MF . Let’s add two more definitions to capture this observation
more precisely.
Definition 5.5. Let A be an m×n matrix with column vectors A = ⃗v1 · · · ⃗vn .
Then, the column space of A is the subspace of Rm given by
Col(A) := Span(⃗v1 , . . . , ⃗vn ).
The null space of A is the subspace of Rn given by
Nul(A) := {⃗x ∈ Rm | A⃗x = ⃗0}.
With this new terminology, we can now generalize our calculations from Lecture
Activity 5.2.
Proposition 5.6. Let F : Rn → Rm be a linear transformation with defining
matrix MF . Then, ker(F ) = Nul(MF ) and im(F ) = Col(MF ).
5.2. Rank-Nullity
The kernel and image of a linear transformation give us key information about how
our function behaves. Let’s develop some geometric
intuition by looking again at
1 1
our linear transformation F = TC where C = .
1 1
But since F is linear we can see that all lines parallel to ker(F ) will also be collapsed
down to a single point. Indeed, if we take any ⃗y ∈ ker(F ) then for any ⃗x ∈ R2 we
have
F (⃗y + ⃗x) = F (⃗y ) + F (⃗x), since F is linear
= ⃗0 + F (⃗x), since ⃗y ∈ ker(F )
= F (⃗x).
5.2. Rank-Nullity 61
That is, the line obtained by shifting ker(F ) by ⃗x also gets collapsed to a single
point, as visualized below.
Repeating this argument, we can see that all lines parallel to the kernel are collapsed
to a point, as visualized below.
P2. Suppose that B has exactly one pivot column, which is located in
column 1. Show that rank(B) = 1 and nullity(B) = 2.
The following result generalizes our work from Lecture Activity 5.4.
Theorem 5.8. Let A be an m×n matrix with r pivot columns. Then, rank(A) = r
and nullity(A) = n−r. That is, the rank of A is equal to the number of pivot columns
of A, and the nullity of A is the number of non-pivot columns of A.
Proof. Suppose that rref(A) = ⃗v1 · · · ⃗vn . Without loss of generality, suppose
that ⃗v1 , . . . , ⃗vr contain pivots, and ⃗vr+1 , . . . , ⃗vn do not contain pivots. Then Col(A)
has dimension r by Theorem 3.11, as needed.
We have the following consequence to Theorem 5.8, often referred to as the rank-
nullity theorem.
Corollary 5.9 (The Rank-Nullity Theorem). Let A be an m × n matrix. Then,
rank(A) + nullity(A) = n.
Proof. Suppose that the matrix A has r pivot columns. By Theorem 3.11 we know
that rank(A) = r. So the result follows by Theorem 5.8. □
5.3. Homogeneous Systems and the Geometry of Systems 63
In the next activity, we’ll see how our work from the previous section gives us a
geometric understanding for the solution set to a homogeneous system.
Remark 5.11. Observe that the solution set to any homogeneous system of linear
equations can be represented as a null space. Indeed, if a system of m linear
equations has coefficient matrix C, then the vector form of the solution set to this
system is equal to
{⃗x ∈ Rm : C⃗x = ⃗0}
which is precisely equal to Nul(C). As we saw in the previous activity, this tells
us that we can quickly detect what the solution set to a homogeneous system of
linear equations looks like. In the following theorem, we extend this to any system
of linear equations.
Theorem 5.12. The vector representation for the solution set to a consistent sys-
tem of linear equations in n variables with coefficient matrix C is equal to
p⃗ + Nul(C) := {⃗
p + ⃗v | ⃗v ∈ Nul(C)}
where p⃗ is any particular vector solution to the system of linear equations.
Proof. Suppose that our system of linear equations has coefficient matrix C and
particular solution p⃗. Then, the system has the same solution set as the matrix-
vector equation C⃗x = ⃗b for a vector ⃗b ∈ Rn . Let ⃗s be any solution to this matrix-
vector equation. Since ⃗s and p⃗ are solutions to the matrix-vector equation C⃗x = 0
we have C⃗s = ⃗0 and C⃗ p = ⃗0. So, C(⃗s −⃗
p) = C⃗s −C⃗p = ⃗0, and hence ⃗s −⃗
p ∈ Nul(C).
That is, ⃗s − p⃗ = ⃗v for some ⃗v ∈ Nul(C) and so adding p⃗ to both sides gives
⃗s = p⃗ + ⃗v ∈ p⃗ + Nul(C).
64 5. [DRAFT - subject to revision] Fundamental Subspaces
Lecture Activity 5.6. Use Theorem 5.12 to determine whether the solu-
tion set for each of the following systems is empty, a point, a line, or a plane
in R3 .
x + 2y + 4z = 1
P1. x+y−z =2
y + 5z = −1
x + 2y + 2z = 5
P2. x+y+z =0
3x + 3z = 1
x + 2y + 4z = 1
P3. x+y−z =2
y + 5z = 1
Note that the row space of a matrix doesn’t have much geometric meaning for us
at the moment, but (time permitting) we will see a geometric interpretation of this
space later on in the course. So let’s bookmark this story for now and come back
to this once we’ve developed a bit more machinery. In the meantime, we record the
following result.
Theorem 5.17. Let A be an m × n matrix. Then,
dim(Col(A)) = dim(Row(A)).
Time permitting, we’ll give a cleaner of this fact later on in the course, but for
completeness we also include an elementary proof of this result below.
Exercises
In this Chapter, we’ll see how our usual operations on functions correspond to
algebraic operations on matrices.
Our work in Lecture Activity 6.1 leads to the following definitions, noting that we
could work similarly to to find the defining matrix for the scalar multiple of any
linear transformation.
Definition 6.1. Let A = ⃗v1 · · · ⃗vn and B = w ⃗1 · · · w ⃗ n be m×n matrices
and c ∈ R be a scalar.
67
68 6. [DRAFT - subject to revision] Matrix Algebra
Let’s look at an example to illustrate how we can more quickly perform this calcu-
lation.
Example 6.4. Let
1 2
1 0 3
A= and B = 0 3 .
1 1 −1
−1 1
Since A is 2 × 3 and B is 3 × 2, the matrix product AB is a 2 × 2 matrix. We have
AB = ⃗a1 ⃗a2
where
1 2
1 0 3 1 0 3
⃗a1 = 0 , and ⃗a2 = 3 .
1 1 −1 1 1 −1
−1 1
So,
−2 5
AB =
,
2 4
With practice, we can perform this computation a bit more quickly. Let’s perform
the steps above by just keeping track of how we’re generating each entry:
1 2
1 0 3 −2 5
0 3 =
1 1 −1 2 4
−1 1
1 2
1 0 3 −2 5
0 3 =
1 1 −1 2 4
−1 1
1 2
1 0 3 −2 5
0 3 =
1 1 −1 2 4
−1 1
1 2
1 0 3 −2 5
0 3 =
1 1 −1 2 4
−1 1
Let’s practice a few more examples.
Since matrix multiplication is not commutative (see Lecture Activity 6.4, for exam-
ple), Definition 6.7 implies that we needed to check both A−1 A = In and AA−1 = In
are satisfied. The following result shows that in fact it suffices to only check one of
these equalities, which will simplify our future calculations.
Lemma 6.9. For n × n matrices A, B, if AB = In then B = A−1 .
Example 6.10. Let’s look at how we could find the inverse of the matrix A from
Example 6.8. Observe that for A−1 to exist, it must satisfy
1 0 0
AA−1 = 0 1 0
0 0 1
and so A−1 must have column vectors ⃗b1 , ⃗b2 , ⃗b3 satisfying the matrix-vector equa-
tions
1 0 0
A⃗b1 = 0 , A⃗b2 = 1 , and A⃗b3 = 0 .
0 0 1
We can use row reduction to solve the first matrix-vector equation, as below
1 1 1 1 1 1 1 1
0 2 1 0 ∼ 0 1 0 0 , subtracting R3 from R2
0 1 1 0 0 1 1 0
1 0 0 1
∼ 0 1 0 0 , subtracting R3 from R1
0 1 1 0
1 0 0 1
∼ 0 1 0 0 , subtracting R2 from R3
0 0 1 0
This gives
1
⃗b1 = 0 .
0
72 6. [DRAFT - subject to revision] Matrix Algebra
Observe that we can use exactly the same row operations to solve for ⃗b2 and ⃗b3 :
1 1 1 0 1 1 1 0
0 2 1 1 ∼ 0 1 0 1 , subtracting R3 from R2
0 1 1 0 0 1 1 0
1 0 0 0
∼ 0 1 0 1 , subtracting R3 from R1
0 1 1 0
1 0 0 0
∼ 0 1 0 1 , subtracting R2 from R3
0 0 1 −1
0
so that ⃗b2 = 1 and similarly we compute
−1
1 1 1 0 1 1 1 0
0 2 1 0 ∼ 0 1 0 −1 , subtracting R3 from R2
0 1 1 1 0 1 1 1
1 0 0 −1
∼ 0 1 0 −1 , subtracting R3 from R1
0 1 1 1
1 0 0 −1
∼ 0 1 0 −1 , subtracting R2 from R3
0 0 1 2
−1
so that ⃗b3 = −2, which gives
1
1 0 −1
A−1 = 0 1 −1 .
0 −1 2
Note that, since we performed the same row operations for every matrix-vector
equation, we could performed the same operations as above by instead looking at
the augmented matrix A I3 , as follows
1 1 1 1 0 0 1 1 1 1 0 0
0 2 1 0 1 0 ∼ 0 1 0 0 1 −1 , subtracting R3 from R2
0 1 1 0 0 1 0 1 1 0 0 1
1 0 0 1 0 −1
∼ 0 1 0 0 1 −1 , subtracting R3 from R1
0 1 1 0 0 1
1 0 0 1 0 −1
∼ 0 1 0 0 1 −1 , subtracting R2 from R3
0 0 1 0 −1 2
6.4. Elementary Matrices 73
Now, if we let
1 0 −1
B = 0 1 −1
0 −1 2
the from our work above we know that AB = I3 . We can also check that BA = I3
and so B = A−1 .
Theorem 6.11. Let A be an n×n matrix. If A In is row equivalent to In B
for an n × n matrix B, then then A is invertible with A−1 = B.
Proof. Suppose that A In is row equivalent to In B for an n × n matrix B,
and and write
B = ⃗b1 ⃗b2 ··· ⃗bn
to the matrix-vector
equation A⃗x = ⃗ui . This gives AB = In . Next, observe that
A In being row equivalent to In B implies that B In is row equivalent
to In A (this is not immediate, you may try convincing yourself of this with
some examples). This proof will then be completed with the following lemma. □
P3. Let E3 be the elementary matrix obtained by performing the row op-
eration R1 + 2R2 to I3 . Find E3 and then calculate E3 A. What do
you notice?
Our observation from Lecture Activity 6.7 generalizes. We omit the proof of this
result here, since the the idea is intuitive, but the notation to prove this in general
is quite messy.
Proposition 6.13. Let E be the elementary matrix obtained by performing row
operation (∗) to In , and let B be any n×n matrix. Then EB is the matrix obtained
by performing elementary row operation (∗) to B.
Lecture Activity 6.8. Let’s see how we can capture Gauss-Jordan via
matrix products. Consider the matrix
1 2 3
A = 0 1 4
0 0 −1
from Lecture Activity 6.6.
P1. Use your work in Lecture Activity 6.6 to find elementary matrices
E1 , . . . , Ek so that E1 · · · Ek A = I3 .
P2. Reverse your work from Lecture Activity 6.7 to show that I3 ∼ A.
That is, find a sequence of elementary operations to perform to I3 to
obtain A.
P3. Find elementary matrices Ẽ1 , . . . , Ẽk so that Ẽk · · · Ẽ1 I3 = A. Con-
clude that A is a product of elementary matrices.
Proof. Suppose first that A is invertible. Then the function TA is invertible, and
so by Proposition 4.14 and 4.17, rref(A) has a pivot in every row and column. Since
A must be n × n (as we saw in Lecture Activity 6.5), we see that A ∼ In . But this
means that In ∼ A as well, and so by repeated use of Proposition 6.13 we have
E1 E2 · · · Em In = A ⇒ A = E1 E2 · · · Em ,
for elementary matrices E1 , . . . , Em .
In the Theorem below, we compile the results we’ve seen so far that guarantee a
given matrix is invertible. Using the correspondences discussed in Remark 4.11,
several more equivalent conditions can be found, and will be included in the Chap-
ter Exercises. Note that you may reference the conditions in the Theorem below
without proof, but all other conditions that appear in the chapter exercises must
be proven on quizzes, tests, and exams.
Theorem 6.15 (The Invertible Matrix Theorem). Let A be an n×n matrix. Then,
the following are equivalent:
(1) A is invertible;
(2) rref(A) = In ;
(3) A is a product of elementary matrices.
Exercises
a b
P6.1 Let A = . Use Theorem 6.11 to show that A is invertible if and only
c d
if ad − bc ̸= 0, and in this case we have
1 d −b
A−1 = .
ad − bc −c a
P6.2 Show that if a matrix A is invertible, then its inverse A−1 is unique. That is,
if there exist matrices B and C satisfying
AB = BA = In and AC = CA = In
show that B = C.
P6.3 Show that for n × n invertible matrices A, B we have
(AB)−1 = B −1 A−1
P6.4 Let A be an n × n matrix. Prove that the following conditions are equivalent.
(a) A is invertible;
(b) The matrix-vector equation A⃗x = ⃗b has a unique solution for any ⃗b ∈ Rn ;
(c) rref(A) has n pivots;
(d) Nul(A) = {⃗0};
(e) Col(A) = Rn ;
(f) The columns of A are linearly independent;
(g) TA is an isomorphism;
(h) TA is injective;
(i) TA is surjective.
P6.5 True or False: If A2 is equal to the zero matrix, then A is equal to the zero
matrix. If true, provide a proof. If false, provide a counterexample and justify
why this is a counterexample.
P6.6 A matrix is called nilpotent if there exists a positive integer m so that
Am is equal to the zero matrix. True or False: if A and B are both nilpo-
tent, then AB is also nilpotent. If true, provide a proof. If false, provide a
counterexample and justify why this is a counterexample.
Chapter 7
In this chapter we’ll define a powerful tool called the determinant. To understand
why this tool is so powerful, we’ll build the determinant completely geometrically
in R2 and R3 , and then extend our definition algebraically to higher dimensions.
7.1. Determinants in R2
Recall from Theorem 4.8 that a linear transformation is completely determined by
where we send the standard basis. That is, if we know where a linear function F
sends ⃗e1 , . . . , ⃗en (or any other basis for that matter) then we know how the function
behaves on all of Rn . Let’s use the observation to visualize how a function behaves
on its entire domain space. We define the following.
Definition 7.1. The unit square is the subset of R2 given by
S := {α1⃗e1 + α2⃗e2 : 0 ≤ α1 , α2 ≤ 1}.
77
78 7. [DRAFT - subject to revision] Determinants
So, as we saw in Lecture Activity 7.2, the image of the unit square F (S) is a
parallelogram in R2 .
Definition 7.3. An ordered basis {⃗b1 , ⃗b2 } for R2 is called positively oriented
if we can rotate ⃗b1 counterclockwise to reach ⃗b2 without crossing the line spanned
by ⃗b2 . Otherwise, the basis is called negatively oriented.
Lecture Activity 7.3. Find the orientation for the following ordered bases
for R2 .
P1. B = {⃗b1 , ⃗b2 } where
⃗b1 = 2 and ⃗b2 = 2 .
0 1
P2. C = {⃗c1 , ⃗c2 } where
1 1
⃗c1 = and ⃗c2 = .
1 −1
With the appropriate casework, we could use a similar argument to Lecture Activity
7.5 to show this formula holds more generally. We’ll allow ourselves to use this result
without completing the remaining cases.
a b
Proposition 7.5. det = ad − bc for any a, b, c, d ∈ R.
c d
7.2. Determinants in R3
Note that we can extend all of our definitions from the previous section to three
dimensions. We have the following.
Definition 7.6. The unit cube is the subset of R3 given by
C := {α1⃗e1 + α2⃗e2 + α3⃗e3 : 0 ≤ α1 , α2 , α3 ≤ 1}.
80 7. [DRAFT - subject to revision] Determinants
Definition 7.8. An ordered basis {⃗b1 , ⃗b2 , ⃗b3 } for R3 is called positively oriented
if it satisfies the right-hand rule. That is, if we point our right hand in the
direction of ⃗b1 , and curl our fingers in toward ⃗b2 , then our thumb should be pointing
in the “direction of ⃗b3 ”– that is, we can rotate our vector ⃗b3 to reach the direction
of our thumb without crossing the plane spanned by ⃗b1 , ⃗b2 . Otherwise, the basis is
called negatively oriented.
Lecture Activity 7.7. Find the orientation of the following ordered bases
for R3 .
P1. B = {⃗b1 , ⃗b2 , ⃗b3 } where
3 0 0
⃗b1 = 0 , ⃗b2 = 2 , and ⃗b3 = 2 .
0 0 1
7.2. Determinants in R3 81
To calculate the determinant of 3×3 matrices, we’ll need to explore how to calculate
volumes of parallelepipeds. We first note that the volume of a parallelepiped is
equal to the area of its base multiplied by the height. In the image below (which
taken from Wiki), this corresponds to the area of the parallelogram shaded in blue,
multiplied by h.
Let’s first see how our work in the previous section can help us calculate determi-
nants of special types of matrices.
Our strategy from Lecture Activity 7.8 generalizes to give us a key property. There
are two more properties we’ll need to complete our calculation, which are included
in the proposition below. Note that this proposition can be developed geometrically,
but would take more time than we have available together this semester. So, on
this rare occassion, we will ask you to accept the following result as true.
Proposition 7.10. The determinant satisfies the following properties.
82 7. [DRAFT - subject to revision] Determinants
a 0 0 b 0 0 c 0 0
det(A) = det 1 2 3 − det 2 1 3 + det 3 1 2 .
4 5 6 5 4 6 6 4 5
Remark 7.14. From our work in the previous section, we see that Definition 7.13
agrees with our definitions of the determinant in the two and three-dimensional
cases. For this reason, the determinant is often used to define volumes in higher
dimensions.
The following result will help simplify our determinant calculations. Justifying
these claims is a bit more technical than we have time to explore together this
semester, so we record these results without proof. Interested readers can find
proofs of these results throughout Poole’s text (which is referenced in the preface
of these notes).
Proposition 7.15 (Determinant Properties). Let A be an n × n matrix.
(1) If B = A⊤ is the transpose of A, then det(A) = det(B);
(2) If B is obtained by interchanging two rows of A, then
det(B) = − det(A);
(3) If B is obtained by multiplying one row of A by a constant c, then
det(B) = c det(A);
(4) If B is obtained by replacing a row of A by that row and a scalar multiple of
another row of A, then det(B) = det(A).
(5) If B is any n × n matrix, then det(AB) = det(A) det(B).
1 2 3 0
84 7. [DRAFT - subject to revision] Determinants
Proposition 7.15 will also help us prove the following result, which we observed
geometrically in lower-dimensions.
Theorem 7.16. Let A be an n × n matrix. Then, A is invertible if and only if
det(A) ̸= 0.
Proof. Suppose first that A is not invertible. Then TA is not surjective, and so by
Theorem 4.17, rref(A) has a row without a pivot. Hence, A is row equivalent to a
matrix B where the first row of B is a row of zeros. Hence, by cofactor expansion
along with Proposition 7.15, we obtain det(A) = c det(B) = c · 0 = 0, where c
is some real number constant. So, if det(A) ̸= 0 it must be the case that A is
invertible.
Exercises
1
P7.1 Let A be an invertible matrix. Show that det(A−1 ) = .
det(A)
P7.2 True or False: For any n×n matrix A, det(−A) = − det(A). If true, provide
a proof. If false, provide a counterexample and justify why this is
a counterexample.
P7.3 True or False: For any two n × n matrices, det(A + B) = det(A) + det(B). If
true, provide a proof. If false, provide a counterexample and justify
why this is a counterexample.
P7.4 True or False: if A and B are square matrices and AB is invertible, then both
A and B are invertible. If true, provide a proof. If false, provide a
counterexample and justify why this is a counterexample.
P7.5 Show that if A and B are n × n matrices with rank(A) = rank(B) = n then
rank(AB) = n.
P7.6 An n × n matrix A is called skew-symmetric if A = −A⊤ . Show that when
n is odd, any n × n skew-symmetric matrix is not invertible.
P7.7 An n × n matrix A is called nilpotent if Am is equal to the zero matrix for
some positive integer m. Show that nilpotent matrices are not invertible.
Chapter 8
8.1. Definitions
In this Chapter, we’ll investigate the “stretch factors” of a linear transformation,
which will help us gain a further geometric understanding of how a linear function
transforms a vector space. We have the following definition.
Lecture Activity 8.1. For each of the following matrix-vector pairs, de-
termine whether ⃗v is an eigenvector of the matrix A. If it is, find the
corresponding eigenvalue λ.
3 2 −2
P1. A = and ⃗v = .
3 8 1
3 2 1
P2. B = and ⃗v =
3 8 1
1 2 −2
P3. C = and ⃗v =
2 4 1
85
86 8. [DRAFT - subject to revision] Eigenvalues and Eigenvectors
⇔ A⃗v − λ⃗v = ⃗0
⇔ A⃗v = λ⃗v ,
as needed. □
3 2
Lecture Activity 8.2. Let A = , and recall from Lecture Activity
3 8
8.1 that λ = 2 is an eigenvalue of A
P1. Find the 2-Eigenspace of A.
P2. Find the geometric multiplicity of λ = 2.
Remark 8.4. By Proposition 8.2, the nonzero vectors in Eλ is equal to the set of
all eigenvectors with corresponding eigenvalue λ. Since we know how to find bases
for null spaces, we thus know how to find all eigenvectors with a fixed eigenvalue.
So what’s left is to find a method to calculate the eigenvalues of a matrix. We have
the following.
Proposition 8.5. A real number λ is an eigenvalue of A if and only if
det(A − λIn ) = 0.
In Lecture Activity 8.3, we saw that χA (x) was a polynomial of degree 2. This
turns out to hold more generally.
Proposition 8.7. For any n × n matrix A, the characteristic polynomial χA (x) is
a polynomial of degree n.
The formal proof of Proposition 8.7 would use an inductive argument, along with
the cofactor expansion formula for the determinant. Instead of worrying about
understanding this proof formally, note that:
(1) If we look at the cofactor formula for the determinant, we see that the only
operations happening are addition and multiplication, and so we end up with
some algebraic expression made up of sums and products of real numbers and
our unknown x, which precisely defines a polynomial.
(2) If an n×n matrix A has diagonal entries d1 , d2 , . . . , dn , then the highest degree
term coming out of the cofactor exapansion will be (d1 − x)(d2 − x) · · · (dn − x)
(convince yourself of this in the 3 × 3 case). So, the degree of χA (x) will be at
most n, and in fact in can be argued that the degree is equal to n (by noting
that the remaining summands each have degree strictly smaller than n).
Remark 8.8. Proposition 8.5 and Proposition 8.2 give us the following strategy
for finding the eigenvectors of a matrix A:
(1) Find all eigenvalues of A by solving the polynomial equation χA (x) = 0.
(2) For each eigenvalue λ, calculate the λ-Eigenspace Eλ = Nul(A − λIn )
(3) The set of all eigenvalues is the union of the λ-Eigenspaces in part (2).
In Chapter 10, we’ll return to our eigen-story to see how these “stretch-factors” can
give key geometric information about how a linear function transforms the domain
space. First, we need to develop a bit more machinery.
88 8. [DRAFT - subject to revision] Eigenvalues and Eigenvectors
Exercises
Lecture Activity 9.1. The standard coordinate grid for R2 is drawn below.
P1. Explain how we can use the standard basis E = {⃗e1 , ⃗e2 } to draw the
grid lines below.
⃗e2
⃗e1
89
90 9. [DRAFT - subject to revision] Coordinate Systems and Change of Basis
P2. Draw the vectors ⃗u = 4⃗e1 + ⃗e2 and ⃗v = −⃗e1 + 5⃗e2 on the coordinate
grid above.
⃗b2 ⃗b1
(0, 0)
P2. The following graph includes the standard coordinate grid defined by
the standard basis E (drawn with solid lines) and the “nonstandard”
coordinate grid defined by the basis B (drawn with dashed lines). Draw
the following vectors on the graph below
⃗u = 4⃗e1 + ⃗e2 , ⃗v = −⃗e1 + 5⃗e2
⃗ = 2⃗b1 − ⃗b2 , ⃗z = 3⃗b1 + 2⃗b2
w
What do you notice?
(0, 0)
9.1. Coordinate Systems 91
P3. Consider the vector ⃗v = 3⃗e1 + 6⃗e2 . Use the graph from the previous
activity to find real numbers x1 , x2 so that ⃗v = x1⃗b1 + x2⃗b2 .
In the activities above, we observed that different bases give different coordinate
grids for R2 , and that coordinate grids give instructions for the location of a vector.
Let’s introduce some terminology to generalize these observations to Rn .
Definition 9.1. Let B = {⃗v1 , ⃗v2 , . . . , ⃗vn } be an ordered basis for a vector space V .
Recall that every vector ⃗x in V can be written in the form
⃗x = x1⃗v1 + · · · + xn⃗vn .
The B-coordinates of ⃗x is the vector in Rn given by
x1
[⃗x]B := ... .
xn
Lecture Activity 9.3. Let B = {⃗b1 , ⃗b2 , ⃗b3 } be the ordered basis for R3
where
1 2 0
⃗b1 = 1 , ⃗b2 = 1 , and ⃗b3 = 1 .
0 −1 3
1
Find the B-coordinates of the vector ⃗v = 3.
4
Note that, in Lecture Activity 9.3 there was precisely one way to write ⃗v as a linear
combination of ⃗b1 , ⃗b2 and ⃗b3 since the vector equation represented by
⃗b1 ⃗b2 ⃗v
had exactly one solution. This turns out to be true in general (and is what allows
us to define the coordinates of a vector with respect to a basis). We have the
following.
Proof. Let ⃗v ∈ V . Since {⃗b1 , . . . , ⃗bm } is a basis for V , this set is linearly indepen-
dent, and so we know that reduced row echelon form of the matrix
⃗b1 · · · ⃗bm
92 9. [DRAFT - subject to revision] Coordinate Systems and Change of Basis
must be consistent. Hence, the reduced row echelon form of the matrix above has
a pivot in every column except for the last column, and so by Theorem 1.27 there
is exactly one solution to the vector equation
⃗v = x1⃗b1 + x2⃗b2 + · · · + xm⃗bm
as needed. □
We give an alternate proof below to see how we could instead use our algebraic
definition of linear independence.
Proof of Theorem 9.2 (version 2). Let ⃗v ∈ V and suppose that we can write
⃗v = x1⃗b1 + · · · + xm⃗bm
and
⃗v = y1⃗b1 + · · · + ym⃗bm .
Subtracting these two equations gives
⃗0 = (x1 − y1 )⃗v1 + · · · + (xm − ym )⃗vm .
Since our vectors ⃗b1 , . . . , ⃗bm are linearly independent, we must have
xi − yi = 0 ⇒ xi = yi
for all i. So, our two representations of ⃗v as a linear combination of the vectors
⃗v1 , . . . , ⃗vm are the same. □
Remark 9.3. Observe that if E = {⃗e1 , . . . , ⃗en } is the standard basis for Rn , then
x1
..
[x1⃗e1 + · · · + xn⃗en ]E = . .
xn
That is, when we talk about the coordinates of a vector without referencing any
specific basis, we really mean the coordinates of that vector with respect to the
standard basis.
Definition 9.4. Let C and B be bases for a vector space V . Then, the change
of basis matrix MC←B is the matrix satisfying
MC←B [⃗x]B = [⃗x]C
for every vector ⃗x in V .
Lecture Activity 9.4. Consider the basis B = {⃗b1 , ⃗b2 } for R2 where
⃗b1 = 2 , and ⃗b2 = 5 .
1 3
P1. Find ME←B .
−1
P2. Show that ME←B is invertible with MB←E = ME←B .
P3. Use your work in P2 to find MB←E .
Our method from the previous activity generalizes. We have the following.
Theorem 9.5. Suppose that B = {⃗b1 , . . . , ⃗bn } is a basis for Rn . Then, for any
vector ⃗x ∈ Rn we have
ME←B = [⃗b1 ]E · · · [⃗bn ]E .
−1
Furthermore, ME←B is invertible and we have ME←B = MB←E .
Proof. Thisproof will generalize what we did in the previous examples. Suppose
x1
that [⃗x]B = ... . Then we have ⃗x = x1⃗b1 + · · · + xn⃗bn . Writing this equation in
xn
standard coordinates gives
x1
..
[⃗x]E = [⃗b1 ]E ··· [⃗bn ]E .
xn
= [⃗b1 ]E · · · [⃗bn ]E [⃗x]B ,
and so ME←B = [⃗b1 ]E · · · [⃗bn ]E , as needed. Next, since B is linearly inde-
pendent, by the Invertible Matrix Theorem (Theorem 6.15), the matrix ME←B is
invertible, and so we have
−1
[⃗x]E = ME←B [⃗x]B ⇒ [⃗x]B = ME←B [⃗x]E .
−1
Hence, ME←B = MB←E . □
This result tells us how to change between the standard basis for Rn and a non-
standard basis. To generalize this idea to changing between two arbitrary bases,
we need the following lemmas, whose proofs will be left to a Chapter Exercise.
Lemma 9.6. Let C be a basis for a vector space V . Then, for any ⃗x, ⃗y ∈ V and
scalar k ∈ R we have
[⃗x + ⃗y ]C = [⃗x]C + [⃗y ]C and [k⃗x]C = k[⃗x]C .
94 9. [DRAFT - subject to revision] Coordinate Systems and Change of Basis
Lemma 9.7. Let {⃗b1 , . . . , ⃗bn } be a linearly independent subset of a vector space V .
Then, for any basis C of V , the set {[⃗b1 ]C , . . . , [⃗bn ]C } is linearly independent.
xn
⃗ ⃗
Then we have ⃗x = x1 b1 + · · · + xn bn . Writing this equation in C-coordinates gives
[⃗x]C = [x1⃗b1 + · · · + xn⃗bn ]C .
By Lemma 9.6 this gives
[⃗x]C = x1 [⃗b1 ]C + · · · + xn [⃗bn ]C
x1
= [⃗b1 ]C · · · [⃗bn ]C ...
xn
= [⃗b1 ]C · · · [⃗bn ]C [⃗x]B ,
and so MC←B = [⃗b1 ]C · · · [⃗bn ]C . Now, by Lemma 9.7 we know that the
columns of MC←B are linearly independent, and so by the Invertible Matrix Theo-
rem (Theorem 6.15) MC←B is invertible. So,
−1
[⃗x]C = MC←B [⃗x]B ⇒ [⃗x]B = MC←B [⃗x]C .
−1
Hence, we have MC←B = MB←C .
Conversely, suppose that the matrix [⃗b1 ]C · · · [⃗bn ]C is invertible. To see that
B is linearly independent, consider the vector equation
α1⃗b1 + · · · + αn⃗bn = ⃗0.
Writing this equation in C-coordinates and applying Lemma 9.6 gives
0
⃗ ⃗ ..
α1 [b1 ]C + · · · + αn [bn ]C = . .
0
Since [⃗b1 ]C · · · [⃗bn ]C is invertible, its columns must be linearly independent,
and so α1 = · · · = αn = 0, as needed. Finally, if B did not span V , then by
Chapter Exercise P3.9, we would have a basis for V of dimension larger than n.
This contradicts the fact that V is n-dimensional, and so B is a basis as needed. □
Exercises 95
Exercises
P9.1 Prove Lemma 9.6.
P9.2 Prove Lemma 9.7.
P9.3 True or False: If B = {⃗b1 , . . . , ⃗bm } is a spanning set for a vector space V , then
every vector ⃗v in V has a unique representation in terms of B (that is, there
are unique real numbers x1 , . . . , xm so that ⃗v = x1⃗b1 + · · · + xm⃗bm ). If true,
provide a proof. If false, provide a counterexample and justify why this is a
counterexample.
P9.4 Let B, C and D be bases for a vector space V . Show that
MC←B MB←D = MC←D .
Note that this justifies our choice of notation for the change of basis matrix
(that is, why we’ve chosen to draw our arrows facing left instead of right).
P9.5 Let V be a vector subspace of Rn of dimension d, and let B and C be bases
for V . What is the size of the change of basis matrix MC←B ? Justify your
answer.
Chapter 10
Proof. This proof will follow similarly to Theorem 4.8. Take any ⃗x ∈ Rn and write
⃗x = x1⃗b1 + · · · + xn⃗bn . Then,
[F (⃗x)]B = [F (x1⃗b1 + · · · + xn⃗bn )]B
= [x1 F (⃗b1 ) + · · · + xn F (⃗bn )]B since F is linear
= x1 [F (⃗b1 )]B + · · · + xn [F (⃗bn )]B by Lemma 9.6
x1
= [F (⃗b1 )]B · · · [F (⃗b1 )]B ...
xn
= [F (⃗b1 )]B · · · [F (⃗b1 )]B [⃗x]B ,
97
98 10. [DRAFT - subject to revision] Similarity and Diagonalization
as needed. □
1 2
Lecture Activity 10.2. Let B = . Find a matrix C that’s similar
3 4
to B, but not equal to B.
Remark 10.5. With the tools we currently have, it is generally challenging for us
to determine whether two matrices are similar. In the following section, we develop
a method to detect matrix similarity for a special families of matrices.
10.3. Diagonalization
Let’s return to our eigen-story from Chapter 9, and generalize what we found in
Lecture Activity 10.1.
Lecture Activity 10.4. Let A be an n×n matrix. Show that if {⃗v1 , . . . , ⃗vn }
is a linearly independent set of eigenvectors, then A is similar to a matrix
of the form
λ1 0 · · · 0
0 λ2 · · · 0
.. .
.. .. ..
. . . .
0 0 · · · λn
Observe that a matrix A is diagonalizable if it’s the defining matrix for a function
F : Rn → Rn with respect to some basis B of Rn . So, if we view Rn with respect
to B-coordinates, we see that F behaves as a dilation transformation.
The following result will help us characterize which matrices are diagonalizable.
10.3. Diagonalization 101
Proof. Observe that we showed the backward direction in Lecture Activity 10.4.
For the forward direction, suppose that A is diagonalizable.
Then, by Theorem
10.4, there’s an invertible matrix C = ⃗v1 · · · ⃗vn and diagonal matrix D =
diag(d1 , . . . , dn ) so that
D = C −1 AC
Since C is invertible, we know that B = {⃗v1 , . . . , ⃗vn } is a linearly independent set,
and hence forms a basis for Rn . So, we just need to show that ⃗vi is an eigenvector
with eigenvalue di for all i = 1, . . . , n. Observe that
(10.1) C⃗ei = ⃗vi ⇒ ⃗ei = C −1⃗vi
and so we have
A⃗vi = CDC −1⃗vi
= CD⃗ei , by Equation (10.1)
= Cdi⃗ei , since the ith column of D is di⃗ei
= di C⃗ei
= di⃗ci , by Equation (10.1)
So, ⃗vi is an eigenvector of A with eigenvalue di . □
Proof. This result follows by induction. We give the idea for the induction step be-
low, and leave the details as a suggested exercise for the interested reader. Suppose
that ⃗v1 , ⃗v2 , . . . , ⃗vn are eigenvectors of a matrix A with corresponding eigenvalues
λ1 , λ2 , . . . , λn , where the eigenvalues are all distinct. Consider the vector equation
(10.2) x1⃗v1 + · · · + xn⃗vn = ⃗0.
Multiplying Equation (10.2) by λ1 gives
x1 λ1⃗v1 + x2 λ1⃗v1 + · · · + xn λ1⃗vn = ⃗0.
Multiplying Equation (10.2) by A, and using that A⃗vi = λi⃗vi , gives
x1 λ1⃗v1 + x2 λ2⃗v2 + · · · + xn λn⃗vn = ⃗0.
Subtracting these two equations yields
x2 (λ2 − λ1 )⃗v2 + · · · + xn (λn − λ1 )⃗vn = ⃗0.
Note that {(λ2 − λ1 )⃗v2 , . . . , (λn − λ1 )⃗vn } is a set of n − 1 distinct eigenvectors
(noting that none of these vectors are nonzero, since our eigenvalues are distinct).
Hence, the proof follows by induction. □
This gives one strategy to more quickly detect whether a matrix is diagonalizable.
Proposition 10.10. An n × n matrix A is diagonalizable if and only if the sum of
the geometric multiplicities of A is equal to n.
The proof of this result is a bit more technical than we have time for together. We
include the details of this result below for interested students, but note that this
proof is not required material for the course.
10.4. Eigendecompositions
Note that if A is diagonalizable with D = C −1 AC we can write A = CDC −1 . This
gives a useful decomposition of our matrix A. We have the following definition.
Definition 10.11. Suppose that A is an n × n diagonalizable matrix with eigen-
values λ1 , . . . , λn and corresponding linearly independent
eigenvectors ⃗v1 , . . . , ⃗vn .
Let D = diag(λ1 , . . . , λn ) and C = ⃗v1 · · · ⃗vn . We call the equality
A = CDC −1
104 10. [DRAFT - subject to revision] Similarity and Diagonalization
Note that the eigendecomposition can also help us compute large powers of a matrix.
We have the following.
Proposition 10.12. Let A be a diagonalizable matrix with eigendecomposition
A = CDC −1 . Then,
An = CDn C −1
for any integer n.
Proof. We have
An = (CDC −1 )n
= (CDC −1 )(CDC −1 ) · · · (CDC −1 )
| {z }
n times
−1 −1
= CD(C C)DC · · · CDC −1
| {z }
n times
= C DD · · · D} C −1
| {z
n times
n −1
= CD C . □
In Chapter Exercise 10.9, you’ll see how eigendecompositions can help us study
other mathematical objects, such as the Fibonacci sequence.
Exercises
P10.1 Show that if A and B are similar matrices, then χA = χB . Conclude that
similar matrices have the same eigenvalues.
P10.2 Show that if A is diagonalizable, then An is diagonalizable for any positive
integer n.
Exercises 105
v1
⃗v =
v2
107
108 11. [DRAFT - subject to revision] Orthogonality
−1 2
P2. ⃗u = 0 and ⃗v = 1
1 1
1 1
2 −1
3 and ⃗v = 0
P3. ⃗u =
1 1
The following Proposition tells us that orthonormal bases preserve dot products,
and as a consequence preserve distances and angles.
Proposition 11.6. Let B be an orthonormal basis for Rn and take any vectors
⃗x, ⃗y in Rn . Then
[⃗x]B · [⃗y ]B = ⃗x · ⃗y .
In particular, we have ∥⃗x∥ = ∥[⃗x]B ∥.
Proof. Suppose that B = {⃗v1 , ⃗v2 , . . . , ⃗vn } is an orthonormal basis for Rn and write
x1 y1
.. ..
[⃗x]B = . and [⃗y ]B = . .
xn yn
110 11. [DRAFT - subject to revision] Orthogonality
That is,
⃗x = x1⃗v1 + · · · + xn⃗vn
⃗y = y1⃗v1 + · · · + yn⃗vn .
Then we have
⃗x · ⃗y = (x1⃗v1 + · · · + xn⃗vn ) · (y1⃗v1 + · · · + yn⃗vn )
Using the distributive properties of the dot product (Proposition 11.3), we’ll end
up with a sum of terms of the form
xi yj ⃗vi⃗vj .
But, since we know that ⃗vi · ⃗vj = 0 whenever i ̸= j then we have
⃗x · ⃗y = x1 y1⃗v1 · ⃗v1 + · · · xn yn⃗vn · ⃗vn .
But we also know that ⃗vi · ⃗vi = ∥⃗v ∥2 = 1, since our basis is orthonormal. So, we
have
⃗x · ⃗y = x1 y1 + · · · + xn yn
as desired. □
⃗ ⃗
Lecture Activity 11.5. Suppose that B = {b1 , b2 } is an orthonormal basis
2 ⃗ ⃗
for R , and consider the matrix Q = b1 b2 .
P1. Show that !
⃗b · ⃗b ⃗b · ⃗b
Q⊤ Q = ⃗ 1 ⃗ 1 ⃗ 1 ⃗ 2 .
b2 · b1 b2 · b2
P2. Use P1 to show that Q⊤ Q = I2 .
P3. Conclude that Q is invertible with Q−1 = Q⊤ .
Proof. Let Q be the matrix with column vectors ⃗vi . Then Q⊤ is the matrix with
rows ⃗vi , and so we can observe that
⃗v1 · ⃗v1 ⃗v1 · ⃗v2 · · · ⃗v1 · ⃗vn
⃗v2 · ⃗v1 ⃗v2 · ⃗v2 · · · ⃗v2 · ⃗vn
Q⊤ Q = . .. .
.. ..
.. . . .
⃗vn · ⃗v1 ⃗vn · ⃗v2 ··· ⃗vn · ⃗vn
So, Q⊤ Q = In if and only if
(
0 if i ̸= j
⃗vi · ⃗vj =
1 if i = j.
which occurs precisely when {⃗v1 , . . . , ⃗vn } forms an orthonormal basis for Rn . □
Just for fun and in case you’re interested, Hadamard matrices are matrices with
orthogonal (but not orthonormal) column vectors which only have entries equal to
±1. It can be shown that for an n × n Hadamard matrix H we have HH ⊤ = nIn
so that H −1 = (1/n)H ⊤ .
⃗x
⃗y
⃗z
P2. Since ⃗z is in Span(⃗y ), we can write ⃗z = c⃗y for some real number c. Use
the previous part to show that
⃗x · ⃗y
c= .
⃗y · ⃗y
P3. Conclude that the closest point on Span(⃗y ) to ⃗x is given by
⃗x · ⃗y
⃗z = ⃗y .
⃗y · ⃗y
The proof for Gram-Schmidt needs induction. Instead of working out these techni-
cal details, let’s take a look at an example to understand why the result holds.
Example 11.12. Let V = Span(⃗v1 , ⃗v2 , ⃗v3 ) be the subspace of R3 with
1 1 2
⃗v1 = 1 , ⃗v2 = 1 , and 0 .
0 −1 2
Note that V = R3 in this case, and we know that the standard basis forms an
orthonormal basis, but let’s look at how Gram-Schmidt edits the given basis.
1
First, set ⃗u1 := ⃗v1 = 1. Then we let
0
0
⃗u2 := ⃗v2 − proj⃗u1 ⃗v2 = 0 .
−1
Observe that ⃗u1 is orthogonal to ⃗u2 . We can see why this step works geometrically
(as in P1 of Lecture Activity 11.6), or algebraically as demonstrated below
⃗v2 · ⃗u1 ⃗v2 · ⃗u1
⃗u1 · ⃗u2 = ⃗u1 ⃗v2 − ⃗u1 = ⃗u1 · ⃗v2 − ⃗u1 · ⃗u1 = 0.
⃗u1 · ⃗u1 ⃗u1 · ⃗u1
Furthermore, since proj⃗u1 ⃗v2 ∈ Span(⃗u1 ) = Span(⃗v1 ) then we can write ⃗u2 = ⃗v2 −c⃗v1
for some c ∈ R and so ⃗u2 ∈ V . Next, we let
1
⃗u3 := ⃗v3 − proj⃗u1 ⃗v3 − proj⃗u2 ⃗v3 = −1 .
0
11.4. The Spectral Theorem 113
Observe that ⃗u3 is orthogonal to ⃗u1 and ⃗u2 . We can see why this step works by
noting the following:
• ⃗u1 is orthogonal to ⃗v3 − proj⃗u1 ⃗v3 , using an argument similar to above;
• Since ⃗u1 is orthogonal to ⃗u2 from the previous step, and proj⃗u2 ⃗v3 is in
Span(⃗u2 ), then ⃗u1 is orthogonal to proj⃗u2 ⃗v3 .
Combining these observations gives
⃗u1 · ⃗u3 = ⃗u1 · (⃗v3 − proj⃗u1 ⃗v3 − proj⃗u2 ⃗v3 )
= ⃗u1 · (⃗v3 − proj⃗u1 ⃗v3 ) − ⃗u1 · proj⃗u2 ⃗v3 )
= 0 − 0 = 0.
We can argue similarly to show that ⃗u2 ·⃗u3 = 0 and so B = {⃗u1 , ⃗u2 , ⃗u3 } is an orthog-
onal set. Now, we need to check that it’s still a basis for V . By Chapter Exercise
P11.9, the set is linearly independent, and from above we know that {⃗u1 , ⃗u2 , ⃗u3 } is
a subset of V . Since dim(V ) = 3, then by Theorem 3.12 we have that B forms a
basis.
Finally, now that we have an orthogonal set, we can make it orthonormal by dividing
each vector by its norm. This gives the orthonormal basis
√ √
1/√2 0 1/ √2
1/ 2 , 0 , −1/ 2 .
0 −1 0
The key point we should take away from this section is that every vector space
has an orthonormal basis, and moreover that such a basis can be found algo-
rithmically as demonstrated above.
Proof. Suppose that Q is orthogonal. Observe first that Q−1 is also orthogonal.
Indeed, by Proposition 11.13 we know that Q−1 = Q⊤ and so Q⊤ Q = In . This
gives (Q⊤ )−1 = Q ⇒ (Q⊤ )−1 = (Q⊤ )⊤ and so Q−1 = Q⊤ is orthogonal by Propo-
sition 11.13.
Next, let Q−1 = ⃗b1 · · · ⃗bn , and observe that Q−1 is the change of basis matrix
Q−1 = ME←B where B = {⃗b1 , . . . , ⃗bn }. So, we have Q = MB←E and since B is an
114 11. [DRAFT - subject to revision] Orthogonality
Note that the could also prove this algebraically – we include this version as well
for completeness. We have
⃗ = (Q⃗v )⊤ Qw
Q⃗v · Qw ⃗
= ⃗v ⊤ Q⊤ Qw
⃗
= ⃗v ⊤ w,
⃗ since Q⊤ = Q−1
= ⃗v · w,
⃗
as needed. □
Remark 11.14. Theorem 11.13 tells us that when Q is orthogonal, TQ is a trans-
formation that preserves distances and angles. So, we can reason geometrically
that Q must be either a rotation or reflection transformation. In Chapter Exercise
P11.8, you’ll prove this formally in the 2 × 2 case.
Let’s first make an observation, which will be useful in our calculations throughout
the remainder of this chapter. Note that if ⃗x, ⃗y are vectors in Rn with standard
coordinate representations
x1 y1
.. ..
⃗x = . and ⃗y = . ,
xn yn
then we can think of these as n × 1 matrices. This allows us to take the matrix
product
y1
⊤
.
⃗x ⃗y = x1 · · · xn .. = x1 y1 + · · · + xn yn ,
yn
which gives the following useful identity
(11.1) ⃗x · ⃗y = ⃗x⊤ ⃗y .
11.4. The Spectral Theorem 115
3 2
Lecture Activity 11.8. Consider the matrix A = from Lecture
2 6
Activity 11.7.
P1. Find a spectral decomposition for A. That is, find an orthogonal matrix
Q and diagonal matrix D so that A = QDQ⊤ .
P2. Use Chapter Exercise P11.8 to show that Q is a rotation matrix. Re-
calling that we can write
cos θ − sin θ
Q= ,
sin θ cos θ
find the angle θ.
P3. Using your work in the previous parts, give a geometric description of
how TA transforms R2 .
While the Spectral Theorem might seem like a special edge case, we can actually
use this result to obtain a similar geometric understanding of any matrix transfor-
mation. We explore this in our final section of the semester.
where the final equality follows because ⃗vi and ⃗vj are orthogonal when i ̸= j. Hence,
{A⃗v1 , . . . , A⃗vm } is an orthogonal subset of Rm .
Next, if we reindex as in the theorem statement, we see that A⃗y ∈ Col(A) if and
only if A⃗y = A(x1⃗v1 + · · · + xn⃗vn ) = x1 A⃗v1 + · · · + xr A⃗vr + ⃗0, and so
Since {A⃗v1 , . . . , A⃗vr } is orthogonal, then by Chapter Exercise P11.9 this set is
linearly independent, and hence is a basis as needed. □
P6. Use geometric reasoning, along with your work from P4, to show that
A = U ΣQ⊤ ,
where U and Q are orthogonal matrices, and Σ is a block diagonal
matrix. Discuss how this decomposition describes the transformation
TA : R2 → R3 as a rotation, followed by dilation/embedding, followed
by another rotation.
The singular value decomposition guarantees that every linear transformation can
be understood in this way. We have the following.
Theorem 11.22 (The Singular Value Decomposition). Let A be an m × n matrix.
Then, there exists an orthogonal m × m matrix U , an orthogonal n × n matrix Q
and a “block diagonal” matrix Σ so that
A = U ΣQ⊤ .
Proof. Suppose that A is an m × n matrix, and let {⃗v1 , . . . , ⃗vn } be the eigenvalues
of A⊤ A which form an orthonormal basis for Rn . By Proposition 11.7 we know
that
Q = ⃗v1 · · · ⃗vn
is an orthogonal matrix. Furthermore, we have
AQ = A⃗v1 ··· A⃗vn .
By Proposition 11.24 if we set A⃗vi = σi ⃗ui , then (up to reindexing) we know that
{⃗u1 , . . . , ⃗ur }
forms an orthonormal basis for Col(A). By Gram-Schmidt, we can extend this to an
orthonormal basis of Rm , say {⃗u1 , . . . , ⃗um }. Since we have σ⃗i = 0 for i = r+1, . . . , n
we get that A⃗vi = σi ⃗ui for all i. We have a few cases.
If n = m, then we have
AQ = σ1 ⃗u1 ··· σn ⃗un = U Σ,
where
U = ⃗u1 ··· ⃗un and Σ = diag(σ1 , . . . , σn ).
120 11. [DRAFT - subject to revision] Orthogonality
where
σ1 0 ··· 0 0 ··· 0
0 σ2 ··· 0 0 ··· 0
U = ⃗u1 ··· ⃗um and Σ = .
.. .. .. .. . . ..
.. . . . . . .
0 0 ··· σm 0 ··· 0
where there are an additional n − m columns of zeros at the end of the matrix Σ.
where
σ1 0 ··· 0
0 σ2 ··· 0
.. .. ..
..
.
. . .
0
Σ= 0 ··· σm
0
0 ··· 0
. .. .. ..
.. . . .
0 0 ··· 0
where there are an additional n − m rows of zeros at the bottom of the matrix Σ.
Given our work with the singular value decomposition, we can extract geometric in-
formation by calculating the singular values of a matrix. The following Proposition
gives a more practical method to calculate these values.
Proof. We have
σi2 = ∥A⃗vi ∥2
= (A⃗vi ) · (A⃗vi )
= (A⃗vi )⊤ (A⃗vi )
= ⃗vi⊤ A⊤ A⃗vi
= ⃗vi⊤ λi⃗vi
= λi⃗vi · ⃗vi
= λi ∥⃗vi ∥2
= λi ,
where the final equality follows √
because the ⃗vi form an orthonormal set. Hence,
σi2 = λi and so λi > 0 and σi = λi . □
Lecture Activity 11.10. Find the singular values of the following matri-
ces. Given your calculations, what can you say about the corresponding
transformations?
2 0
(1) A = 0 2
1 0
1 2 1
(2) B = 0 1 −1
1 1 2
1 1
(3) C =
1 −1
Exercises
P11.1 Prove Lemma 11.3.
P11.2 True or False: If ⃗x and ⃗y are vectors in Rn and ⃗x · ⃗y = 0 then either ⃗x = ⃗0
or ⃗y = ⃗0. If true, provide a proof. If false, provide a counterexample and
justify why this is a counterexample.
P11.3 True or False: For a vector ⃗x in Rn we have that ∥⃗x∥ = 0 if and only if ⃗x = ⃗0.
If true, provide a proof. If false, provide a counterexample and justify why
this is a counterexample.
P11.4 True or False: For any vectors ⃗x, ⃗y in Rn we have ∥⃗x + ⃗y ∥ = ∥⃗x∥ + ∥⃗y ∥. If
true, provide a proof. If false, provide a counterexample and justify why this
is a counterexample.
P11.5 For vectors ⃗x, ⃗y in Rn show that d(⃗x, ⃗y ) = d(⃗y , ⃗x).
P11.6 Show that if A and B are orthogonal matrices, then the product AB is also
orthogonal.
P11.7 Show that if Q is orthogonal, then det(Q) = ±1.
122 11. [DRAFT - subject to revision] Orthogonality
P11.8 In this problem, we’ll show that the 2 × 2 orthogonal matrices transform R2
by either reflection or rotation.
(a) Show that for a vector ⃗v ∈ R2 , ∥⃗v ∥ = 1 if and only if ⃗v is of the form
cos θ
⃗v = , where θ is the angle ⃗v makes with the positive x-axis.
sin θ
(b) Suppose that Q is orthogonal. Use the previous part to show that
cos θ − sin θ cos θ sin θ
Q= or Q = .
sin θ cos θ sin θ − cos θ
(Hint: note that if Q = ⃗v w ⃗ is orthogonal, then the angle w ⃗ makes
with the positive x-axis is θ ± π/2, and then apply trig identities.)
(c) Conclude that if Q is a 2 × 2 orthogonal matrix, then Q is a rotation
matrix when det(Q) = 1 and a reflection matrix when det(Q) = −1.
P11.9 Show that any orthogonal set of nonzero vectors {⃗v1 , . . . , ⃗vm } in Rn is linearly
independent. That is, if ⃗vi · ⃗vj = 0 for all i ̸= j, then the set {⃗v1 , . . . , ⃗vm } is
linearly independent.
P11.10 Show that the rank of a matrix A is equal to the number of nonzero singular
values of A.
P11.11 Show that a square matrix A is invertible if and only if 0 is not a singular
value of A.
P11.12 Show that A and A⊤ have the same nonzero singular values.
Chapter Exercise Solutions
123