Linear Algebra Course Summary 2013-2014
Linear Algebra Course Summary 2013-2014
Michele Facchinelli
In case of any comments about the content of the summary, please do not hesitate to contact
me at [Link]@[Link].
i
Changelog
This is version 1.0. Below are listed the changes applied to each version.
ii
Contents
3 Determinants [§3] 9
3.1 Introduction to Determinants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2 Proprieties of Determinants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.3 Cramer’s Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
iii
1 | Linear Equations in Linear Algebra [§1]
1.1 | Equivalence of Notations
Theorem 1.1. Notations.
The matrix equation
Ax = b
the vector equation
x1 a1 + · · · + xn an = b
and the linear system
a1 ... an |b
all share the same solution set.
1.2 | Homogeneous Linear Systems
A homogeneous linear system is one of the type Ax = 0 , where A is a m × n matrix and 0 is the
zero vector in Rm .
The homogeneous equation
Ax = 0
has a non trivial solution (i.e. not x = 0) if and only if the equation has at least one free variable.
Theorem 1.3. If a set containes more vectors that there are entries in each vector (or a matrix with
more columns than rows), then the set is linearly dependent. That is, any set S = {v 1 , . . . , v p }
in Rn is linearly dependent if p > n.
1
1.5 | Introduction to Linear Transformations
A matrix equation Ax = b can arise in linear algebra in a way that is not directely connected
with linear combinations of vectors. This happens when we think of the matrix A as an object that
“acts”as a vector x by multiplication to produce a new vector called Ax.
A transformation (or function or mapping) T from Rn to Rm is a rule that assigns to each
vector x in Rn a vector T (x) in Rm . The set Rn is called the domain of T , and Rm is called the
codomain of T . The notation
T : Rn → Rm
indicates that the domain of T is Rn and the codomain is Rm . For x in Rn , the vector T (x) in Rm
is called the image of x (under the action of T ). The set of all images T (x) is called the range of
T.
For each x in Rn , T (x) is computed as Ax, where A is a m × n matrix. A matrix transformation
is usually denoted by x 7→ Ax.
The step from equation (1.4) to equation (1.5) explains why the knowledge of T (e1 ) and T (e2 ) is
sufficient to determine T (x) for any x.
Theorem 1.4. Let T : Rn → Rm be a linear transformation. Then there exists a unique matrix A
such that
T (x) = Ax for all x in Rn
In fact, A is the m × n matrix whose jth column is the vector T (ej ), where ej is the jth column of
the of the identity matrix in Rn :
A = T (e1 ) · · · T (en ) (1.6)
2
This matrix A in equation (1.6) is called the standard matrix for the linear transformation T .
Theorem 1.6. Let T : Rn → Rm be a linear trasformation and let A be the standard matrix for T .
Then:
(i) T maps Rn onto Rm if and only if the columns of A span Rm ;
3
2 | Matrix Algebra [§2]
2.1 | Matrix Operations
If A is an m × n matriz, then the scalar entry in the ith row and jth column of A is denoted by aij
and is called the (i, j)-entry of A.
The diagonal entries in an m × n matrix A = [aij ] are a11 , . . . , aii and they form the main
diagonal of A. A diagonal matrix is a square n × n matrix whose nondiagonal entries are zero.
Two examples are the n × n identity matrix, In , and the n × n zero matrix, 0n .
Two matrices are equal if they have the same size and if their corresponding columns are
equal.
The sum A + B is the m × n matrix whose columns are the sums of the corresponding columns
in A and B.
4
a b
Theorem 2.1. Let A = . If ad − bc 6= 0, then A is invertible and
c d
d −b
A−1 =
1
ad − bc −c a
An elementary matrix is one that is obtained by performing a single elementary row opera-
tion on an identity matrix.
If an elementary row operation is performed on an m × n matrix A, the resulting matrix can be
written as EA, where the m × m matrix E ia created by performing the same row operation on Im .
Theorem 2.2. An n × n matrix A is invertible if and only if A is row equivalent to In , and in this
case, any sequence of elementary row operations that reduce A to In also transforms In into A−1 .
Applying theorem 2.2 to an invertible matrix A gives
A ∼ E1 A ∼ · · · ∼ Ep (Ep−1 · · · E1 A) = In
then, the product Ep · · · E1 consists of the inverse of A. Hence
A−1 = Ep · · · E1
If we place A and I side-by-side to form an augmented matrix [ A | I ], then row operations on this
matrix produce identical operations on A and I. Then, if A is row equivalent to I, [ A | I ] is row
equivalent to [ I | A−1 ]. Otherwise A does not have an inverse.
5
A linear transformation T : Rn → Rn is said to be invertible if there exists a function S : Rn → Rn
such that
S(T (x)) = x for all x in Rn
T (S(x)) = x for all x in Rn
Hence, T is invertible if and only if its standard matrix A is invertible.
2.4 | Subspaces of Rn
A subspace of Rn is any set H ∈ Rn that has three proprieties:
(i) 0 ∈ H;
(ii) ∀ u, v ∈ H, (u + v) ∈ H;
(iii) ∀ u ∈ H and ∀ c ∈ R, (cu) ∈ H.
In words, a subspace is closed under addition and scalar multiplication. Examples of subspaces
are a plane or a line both through the origin.
The column space of a matrix A is the set ColA of all linear combinations of the columns of
A.
If A = a1 · · · an , with the columns in Rm , then ColA is the same as Span{a1 , . . . , an }.
The column space of an m × n matrix is a subspace of Rm . Note that ColA equals Rm only when
the columns of A span Rm .
When a system of linear equations is written in the form Ax = b, the column space of A is the
set of all b for which the system has a solution.
The null space of a matrix A is the set NulA of all solutions of the homogeneous equation
Ax = 0.
Theorem 2.3. The null space of an m × n matrix A is a subspace of Rn . Equivalently, the set of
all solutions of a system Ax = 0 of m homogeneous linear equations in n unknowns is a subspace
of Rn .
Because a subspace typically contains an infinite number of vectors, some problems are handled
best by working with a small finite set of vectors that span the subspace. The smaller the set, the
better. The smallest possible spanning set must be linearly independent.
The columns of an invertible n × n matrix form a basis for all of Rn , because they are lin-
early independent and span Rn . One such matrix is the n × n identity matrix. Its columns are
denoted by e1 , . . . , en :
1 0
e1 = ... , . . . , en = ...
0 1
n
The set {e1 , . . . , en } is called the standard basis for R .
The standard procedure for writing the solution set of Ax = 0 in parametric vector form, ac-
tually identifies a basis for NulA.
Suppose you are given a 3 × 5 matrix A and you are asked to compute the null space of such
matrix:
a11 · · · a15 x1
A = ... .. with solution x = .. = x u + x v + x w
..
. . . 2 3 5
a31 ··· a35 x5
The general solution shows that NulA coincides with the set of all linear combinations of u, v and w.
That is, {u, v, w} generates NulA. So {u, v, w} is a basis for NulA.
6
Theorem 2.4. The pivot columns of a matrix A form a basis for the column space of A.
Be careful to use pivot columns of A itself for the basis of ColA. The columns of an echelon form
AR are often not in the column space of A.
x = c1 b1 + · · · + cp bp and x = d1 b1 + · · · + dp bp
The dimention of a nonzero subspace H, denoted by dimH, is the number of vectors in any
basis for H. The dimention of the zero subspace {0} is defined to be zero.
The rank of a matrix A, denoted by rankA, is the dimention of the column space of A.
Since the pivot columns of A form a basis for ColA, the rank of A is just the number of pivot
columns in A.
Theorem 2.5. The Rank Theorem.
Since the nonpivot columns correspond to the free variables in Ax = 0, if a matrix A has n columns,
then rankA + dimNulA = n.
If A is an m × n matrix, each row of A has n entries and thus can be identified with a vector in Rn .
The set of all linear combinations of the row vector is called the row space of A and is denoted
by RowA, which is also a subspace of Rn . Since the rows of A are identified with the columns of
AT , we could also write ColAT in place of RowA.
If two matrices A and B are row equivalent (A ∼ B), then their row spaces are the same. If B
is in echelon form, the nonzero rows of B form a basis for the row space of A as well as for that
of B.
7
Theorem. The Invertible Matrix Theorem (Continued).
Let A be an n × n matrix. Then the following statements are each equivalent to the statement A
is an invertible matrix (see appendix A).
8
3 | Determinants [§3]
3.1 | Introduction to Determinants
If A is a 3 × 3 matrix, we can write it as
a11 a12 a13
A = a21 a22 a23
a31 a32 a33
∆ = det A = |A| = a11 det A11 − a12 det A12 + a13 det A13
Then,
det A = a11 C11 + · · · + a1n C1n
This formula is called a cofactor expansion across the first row of A.
Theorem 3.2. If A is a triangular matrix, the det A is the product of the entries on the main
diagonal of A.
(i) If a multiple of one row of A is added to another row to produce a matrix B, then det A = det B;
(ii) If two rows of A are interchanged to produce B, then det B = − det A;
(iii) If one row of A is multiplied by k to produce B, then det B = k · det A.
Suppose a square matrix has been reduced to an echelon form U by row replacements and row
interchanges. If there are r interchanges, then, as seen before,
9
Since U is in echelon form (not the reduced echelon form), it is triangular,
• ∗ ∗ ∗
0 • ∗ ∗
U= 0 0 • ∗
0 0 0 •
and so det U is the product of the diagonal entries u11 , . . . , unn . If A is invertible, the entries uii
are all pivots. Otherwise, at least one unn is zero. Thus
(−1)r · (product of pivots in U) if A invertible
det A =
0 if A not invertible
Theorem 3.4. A square matrix A is invertible if and only if det A 6= 0.
10
Theorem 3.8. An Inverse Formula.
Let A be an invertible n × n matrix. Then
A−1 =
1
det A
adjA
11
4 | Eigenvalues and Eigenvectors [§5]
4.1 | Eigenvectors and Eigenvalues
An eigenvecotr of an n × n matrix A is a nonzero vector x such that Ax = λx for some scalar λ.
A scalar λ is called an eigenvalue of A if there is a nontrivial solution x of Ax = λx; such an x
is called an eigenvector corresponding to λ.
A scalar λ is an eigenvalue of an n × n matrix A if and only if the equation
(A − λI)x = 0 (4.1)
has a non trivial solution. The set of all solutions of (4.1) is just the null space of the matrix
A − λI. So this set is a subspace of Rn and is called the eigenspace of A corresponding to λ. The
eigenspace consists of the zero vector and all the eigenvectors corresponding to λ.
Theorem 4.1. The eigenvalues of a triangular matrix are the entries on its main diagonal.
Zero is an eigenvalue of A if and only if A is not invertible.
Theorem 4.2. If v 1 , . . . , v r are eigenvectors that correspond to distinct eigenvalues λ1 , . . . , λr of
an n × n matrix A, then the set v 1 , . . . , v r is linearly independent.
4.3 | Similarity
If A and B are n × n matrices, then A is similar to B if there is an invertible matrix P such that
P −1 AP = B, or, equivalentely, A = PBP −1 . Writing Q for P −1 , we have Q −1 BQ = A. So B is
also similar to A, and we say simply that A and B are similar. Changing A into P −1 AP is called
a similarity transformation.
Theorem 4.3. If n × n matrices A and B are similar, then they have the same characteristic
polynomial and hence the same eigenvalues (with the same algebraic multiplicities).
Warnings:
(i) Having the same eigenvalues does not mean being similar;
(ii) Similarity is not the same a row equivalence; row operations on a matrix usually changes its
eigenvalues.
12
4.4 | Diagonalization
In many cases, the eigenvalue-eigenvector information contained within a matrix A can be dis-
played in a useful factorizartion of the form A = PDP −1 where D is a diagonal matrix.
Diagonalizing Matrices:
To diagonalize A, an n × n matrix:
Step 1 Find the eigenvalues of A using equation (4.2).
Step 2 Find n linearly independent eigenvectors of A.
Step 3 Construct P from the vectors just found.
Step 4 Construct D from the corresponding eigenvalues.
(i) For 1 ≤ k ≤ p, the dimention of the eigenspace for λk is less than or equal to the algebraic
multiplicity of the eigenvalue λk ;
(ii) The matrix A is diagonalizable if and only if the sum of the dimensions of the eigenspaces
equals n, and this happens if and only if (1) the characteristic polynomial factors completely
into linear factors, and (2) the dimension of the eigenspace for each λk , the geometric mul-
tiplicity, equals the algebraic multiplicity of λk ;
(iii) If A is diagonalizable and Bk is a basis for the eigenspace corresponding to λk for each k,
then the total collection of vectors in the set B1 , . . . , Bp forms an eigenvector basis for Rn .
and
T (x) = T (r1 b1 + · · · + rn bn ) = r1 T (b1 ) + · · · + rn T (bn ) (4.3)
13
because T is linear. Since the coordinate mapping from W to Rm is linear, equation (4.3) leads
to:
[T (x)]C = r1 [T (b1 )]C + · · · + rn [T (bn )]C (4.4)
Since C-coordinate vectors are in Rm , the vector equation (4.4) can be written as a matrix equation,
namely
[T (x)]C = M[x]B (4.5)
where
M= [T (b1 )] ··· [T (bn )] (4.6)
The matrix M is a matrix representation of T , called the matrix for T relative to the bases B and
C.
Equation (4.5) says that the action of T on x may be viewed as left-multiplication by M.
In the common case where W is the same as V and the basis C is the same as B , the ma-
trix M in equation (4.6) is called the matrix for T relative to B , or simply the B -matrix for T , and
is denoted by [T ]B .
The B -matrix for T : V → V satisfies
The complex conjugate of a complex vector x in Cn is the vector x in Cn whose entries are
the complex conjugates of the entries in x. The real and imaginary parts of a complex vector x
are the vectors <x and =x formed from the real and imaginary parts of the entries of x.
Ax = Ax = λx = λx
Hence λ is also an eigenvalue of A, with x a corresponding eigenvector. This shows that, when A
is real, its complex eigenvalues occur in conjugate pairs.
In theorem 4.8, the matrix P provides a change of variable. The action of A amounts to a change
of variables (P), followed by a rotation (C ) and then a return to the original variable (P −1 ).
The matrix C in theorem 4.8 can also be written as
r 0 cos φ − sin φ
C=
0 r sin φ cos φ
√
where r is given by a2 + b2 and φ represents the rotation.
14
4.7 | Application to Differential Equations
In many applied problems, several quantities are varying continuously in time, and they are related
by a system of differential equations:
Here x1 , . . . , xn are differentiable functions of t, with derivatives x10 , . . . , xn0 , and the aij are con-
stants. The crucial feature of this system is that it is linear. To see this, write the system as a
matrix differential equation
x 0 (t) = Ax(t) (4.7)
where
x10 (t)
x1 (t) a11 ··· a1n
x(t) = ... x 0 (t) = ... A= .
.. .. ..
. .
xn (t) xn0 (t) an1 ··· ann
A solution of equation (4.7) is a vector valued function that satisfies (4.7) for all t in some interval
of real numbers.
Equation (4.7) is linear because both differentiation of functions and multiplication of vectors
by a matrix are linear transformations.
For the general solution of equation (4.7), a solution might be a linear combination of functions of
the form
x(t) = veλt (4.8)
for some scalar λ and some fixed nonzero vector v. Observe that
x 0 (t) = λveλt
λveλt = Aveλt
Ax(t) = Aveλt
Since eλt is never zero, x 0 (t) will equal Ax(t) if and only if λv = Av, that is, if and only if λ is
an eigenvalue of A and v is a corresponding eigenvector. Thus each eigenvalue-eigenvector pair
provides a solution (4.8) of x 0 = Ax. Such solutions are sometimes called eigenfunctions of the
differential equation.
For any dynamical system described by x 0 (t) = Ax with A an n × n matrix with n linearly
independent eigenvectors (i.e. with A diagonalizable), a solution can be found in the following
way.
Suppose the eigenfunctions for A are
v 1 eλ1 t , . . . , v n eλn t
with v 1 , . . . , v n linearly independent eigenvectors. Let P = v 1 · · · v n , and let D be the
diagonal matrix with entries λ1 , . . . , λn so that A = PDP −1 . Now make a change of variable,
defining a new function y by
The equation x(t) = Py(t) says that y(t) is the coordinate vector of x(t) relative to the eigenvector
basis. Substitution of Py for x in the equation x 0 = Ax gives
d
(Py) = A(Py) = (PDP −1 )Py = PDy
dt
(4.9)
15
Since P is a constant matrix, the left side of equation (4.9) is Py0 . Left-multiply both sides of
(4.9) by P −1 and obtain y0 = Dy, or
0
y1 (t) λ1 · · · 0 y1 (t)
.. .. .. .. ..
. = . . . .
0
yn (t) 0 · · · λn yn (t)
The change of variables from x to y has decoupled the system of differential equations. Since
y01 = λ1 y1 , we have y1 (t) = c1 eλ1 t , with similar formulas for y2 , . . . , yn . Thus
c1 eλ1 t
y(t) =
..
.
cn eλn t
In case a real matrix A has a pair of complex eigenvalues λ and λ, with associated eigenvec-
tors v and v, two solutions of x 0 = Ax are
where it can be shown that x 2 (t) = x 1 (t). This two solutions will obvioulsy involve complex
numbers.
For a real matrix A with an eigenvalue λ = a + bi, a corresponding eigenvector v and a
complex solution x 1 (t) = veλt of x 0 = Ax, two real solutions of the same x 0 = Ax are given by
The direction of greatest attraction is along the line through 0 and the eigenfunction corresponding
to the smaller eigenvalue.
16
The origin is called a repeller of the dynamical system when trajectories tend away from 0.
This occurs whenever both eigenvalues are positive:
The direction of greatest repulsion is the line though 0 and the eigenfunction corresponding to
the eigenvalue of larger magnitude.
The origin is called a saddle point of the dynamical system when some trajectories approach
the origin at first and then change direction and move away from the origin. This occurs whenever
one eigenvalue is positive and the other is negative:
The direction of greatest attraction is determined by the eigenfunction for the eigenvalue of smaller
magnitude. The direction of greatest repulsion is determined by the eigenfunction for the eigen-
value of greater magnitude.
In case the matrix A has complex eigenvalues given by λ = a ± bi, the origin may be a spi-
ral point. The rotation is caused by the sine and cosine functions that arise from a complex
eigenvalue. When the real part of the complex eigenvalue is positive (a > 0), the trajectories
spiral outward. When the real part of the complex eigenvalue is negative (a < 0), the trajectories
spiral inward.
If the real part of the eigenvalue is zero (a = 0), the trajectories form ellipses around the
origin.
17
5 | Orthogonality and Least Squares [§6]
5.1 | Inner Product and Orthogonality
If u and v are vectors in Rn
uT v = v T u = u · v
is called the inner product or dot product. If
u1 v1
u= . and v = ..
.. .
un vn
A vector whose length is 1 is called a unit vector. If we divide a nonzero vector v by its length,
we obtain a unit vector u. This process is sometimes called normalising.
For u and v in Rn , the distance between u and v, written as dist(u, v), is the length of the
vector u − v. That is,
dist(u, v) = u − v
Two vectors u and v are orthogonal (to each other) if u · v = 0.
Theorem 5.2. Let A be an m × n matrix. The orthogonal complement of the row space of A is the
null space of A, and the orthogonal complement of the column space of A is the null space of AT :
For u and v in either R2 or R3 , the inner product of the two vectors can be written as
An orthogonal basis for a subspace W of Rn is a basis for W that is also an orthogonal set.
18
Theorem 5.4. Let {u1 , . . . , up } be an orthogonal basis for a subspace W of Rn . For each y in
W , the weights in the linear combination
y = c1 u1 + · · · + cp up
are given by
y · uj
cj = (j = 1, . . . , p)
uj · uj
Given a nonzero vector u in Rn , consider the problem of decomposing a vector y in Rn into the
sum of two vectors, one a multiple of u and the other orthogonal to u. We wish to write
y = ŷ + z (5.1)
where ŷ = αu for some scalar α and z is some vector orthogonal to u. Let z = y − αu. Then
y − ŷ is orthogonal to u if and only if
y = ŷ + z (5.2)
and z = y − ŷ.
The vector ŷ in (5.2) is called the orthogonal projection of y onto W and is often written as projW y.
19
Theorem 5.7. The Best Approximation Theorem.
Let W be a subspace of Rn , let y be any vector in Rn , and let ŷ be the orthogonal projection of
y onto W . Then ŷ is the closest point in W to y, in the sense that
v 1 = x1
x2 · v 1
v 2 = x2 − v1
v1 · v1
..
.
xp · v 1 x p · v p−1
v p = xp − v1 − · · · − v p−1
v1 · v1 v p−1 · v p−1
Then {v 1 , . . . , v p } is an orthogonal basis for W . In addition
R = QT A
20
5.5 | Least-square Problems
When a solution to a linear system Ax = b is demanded and none exists, the best one can do is
to find an x that makes Ax as close as possible to b.
Think of Ax as an approximation to b. The smaller the distance between b and Ax, given by
||b − Ax||, the better the approximation. The general least-squares problem is to find an x that
makes ||b − Ax|| as small as possible.
If A is m × n and b is in Rm , a least-square solution of Ax = b is an x̂ in Rn such that
for all x in Rn .
The most important aspect of the least-square problem is that no matter what x we select, the
vector Ax will necessarely be in the column space, ColA. So we can seek an x that makes Ax the
closest point in ColA to b.
AT Ax = AT b (5.4)
The matrix equation (5.4) represents a system of equations called the normal equations for Ax = b.
A solution of (5.4) is often denoted by x̂.
Theorem 5.11. The set of least-squares solutions of Ax = b coincides with the nonempty set of
solutions of the normal equations AT Ax = AT b.
Theorem 5.12. Let A be an m × n matrix. The following statements are logically equivalent:
(i) The equation Ax = b has a unique least-squares solution for each b in Rm ;
x̂ = (AT A)−1 AT b
21
6 | Symmetric Matrices [§7]
6.1 | Diagonalization of Symmetric Matrices
A symmetric matrix is a matrix A such that AT = A. Such a matrix is necessarily square. Its main
diagonal entries may be arbitrary, but its other entries occur in pairs.
Theorem 6.1. If A is symmetric, then any two eigenvectors from different eigenspaces are orthog-
onal.
An n × n matrix A is said to be orthogonally diagonalizable if there are an orthogonal matrix P
(with P −1 = P T ) and a diagonal matrix D such that
A = PDP T = PDP −1 (6.1)
Such a diagonalization requires n linearly independent and orthonormal eigenvectors. If A is
orthogonally diagonalizable as in (6.1), then
AT = (PDP T )T = PDP T = A
Thus A is symmetric. Note that the diagonal entries of D are the eigenvalues λ1 , . . . , λn .
Theorem 6.2. An n × n matrix A is orthogonally diagonalizable if and only if A is a symmetric
matrix.
The set of eigenvalues of a matrix A is sometimes called the spectrum of A, and the following
description of the eigenvalues is called a spectral theorem.
Theorem 6.3. The Spectral Theorem for Symmetric Matrices.
An n × n symmetric matrix A has the following proprieties:
22
Theorem 6.4. The Principal Axes Theorem.
Let A be an n × n symmetric matrix. Then there is an orthogonal change of variable x = Py, that
transforms the quadratic form from x T Ax into a quadratic form yT Dy with no cross-product term.
The columns of P in theorem 6.4 are called the principal axes of the quadratic form x T Ax. The
vector y is the coordinate vector of x relative to the orthonormal basis of Rn given by these
principal axes.
x T Ax = c
either corresponds to an ellipse, a hyperbola, two intersecting lines, a single point or contains no
points at all. If A is a diagonal matrix, the graph is in standard position, otherwise, if A is not
diagonal, the graph is rotated out of strandard position.
(ii) negative definite if and only if the eigenvalues of A are all negative, or
(iii) indefinite if and only if A has both positive and negative eigenvalues.
23
A | Invertible Matrix Theorem
Theorem. The Invertible Matrix Theorem.
Let A be a square matrix n × n. Then the following statements are equivalent. That is, for a given
A, the statements are either all true or all false.
(i) A is an invertible matrix;
(ii) A is row equivalent to the n × n identity matrix;
(iii) A has n pivot points;
(xiv) ColA = Rn ;
(xv) dimColA = n;
(xvi) rankA = n;
(xvii) NulA = {0};
(xviii) dimNulA = 0;
(xix) The determinant of A is not zero;
(xx) The number 0 is not an eigenvalue of A.
I
This was: