lectures on linear algebra philip korman

228
Lectures on Linear Algebra 1 Philip Korman 2 3 April 24, 2022 4

Upload: others

Post on 25-Apr-2022

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lectures on Linear Algebra Philip Korman

Lectures on Linear Algebra1

Philip Korman2

3

April 24, 20224

Page 2: Lectures on Linear Algebra Philip Korman

Contents1

1 Systems of Linear Equations 42

1.1 Gaussian Elimination . . . . . . . . . . . . . . . . . . . . . . . 43

1.2 Using Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . 114

1.2.1 Complete Forward Elimination . . . . . . . . . . . . . 175

1.3 Vector Interpretation of Linear Equations . . . . . . . . . . . 206

1.4 Solution Set of a Linear System Ax = b . . . . . . . . . . . . 277

1.5 Linear Dependence and Independence . . . . . . . . . . . . . 338

2 Matrix Algebra 409

2.1 Matrix Operations . . . . . . . . . . . . . . . . . . . . . . . . 4010

2.2 The Inverse of a Square Matrix . . . . . . . . . . . . . . . . . 4611

2.3 LU Decomposition . . . . . . . . . . . . . . . . . . . . . . . . 5412

2.4 Subspaces, Bases and Dimension . . . . . . . . . . . . . . . . 6113

2.5 Null Spaces and Column Spaces . . . . . . . . . . . . . . . . . 6814

3 Determinants 7515

3.1 Cofactor Expansion . . . . . . . . . . . . . . . . . . . . . . . . 7516

3.2 Properties of Determinants . . . . . . . . . . . . . . . . . . . 8017

3.3 Cramer’s Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . 8918

3.3.1 Vector Product . . . . . . . . . . . . . . . . . . . . . . 9219

4 Eigenvectors and Eigenvalues 9720

4.1 Characteristic Equation . . . . . . . . . . . . . . . . . . . . . 9721

4.1.1 Properties of Eigenvectors and Eigenvalues . . . . . . 10122

4.2 A Complete Set of Eigenvectors . . . . . . . . . . . . . . . . . 10723

4.2.1 Complex Eigenvalues . . . . . . . . . . . . . . . . . . . 11024

4.3 Diagonalization . . . . . . . . . . . . . . . . . . . . . . . . . . 11425

2

Page 3: Lectures on Linear Algebra Philip Korman

CONTENTS 3

5 Orthogonality and Symmetry 1221

5.1 Inner Products . . . . . . . . . . . . . . . . . . . . . . . . . . 1222

5.2 Orthogonal Bases . . . . . . . . . . . . . . . . . . . . . . . . . 1263

5.3 Gram-Schmidt Orthogonalization . . . . . . . . . . . . . . . . 1354

5.3.1 QR Factorization . . . . . . . . . . . . . . . . . . . . . 1375

5.3.2 Orthogonal Matrices . . . . . . . . . . . . . . . . . . . 1396

5.4 Linear Transformations . . . . . . . . . . . . . . . . . . . . . 1467

5.5 Symmetric Transformations . . . . . . . . . . . . . . . . . . . 1538

5.6 Quadratic Forms . . . . . . . . . . . . . . . . . . . . . . . . . 1609

5.7 Vector Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . 16810

6 Systems of Differential Equations 17611

6.1 Linear Systems with Constant Coefficients . . . . . . . . . . . 17612

6.2 A Pair of Complex Conjugate Eigenvalues . . . . . . . . . . . 18413

6.3 The Exponential of a Matrix . . . . . . . . . . . . . . . . . . 18814

6.4 The General Case of Repeated Eigenvalues . . . . . . . . . . 19315

6.5 Non-Homogeneous Systems . . . . . . . . . . . . . . . . . . . 20016

7 Applications to Calculus and Differential Geometry 20517

7.1 Hessian Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . 20518

7.2 Jacobian Matrix . . . . . . . . . . . . . . . . . . . . . . . . . 21019

7.3 Curves and Surfaces . . . . . . . . . . . . . . . . . . . . . . . 21120

7.4 The First Fundamental Form . . . . . . . . . . . . . . . . . . 21121

7.5 The Second Fundamental Form . . . . . . . . . . . . . . . . . 21622

7.6 Principal Curvatures . . . . . . . . . . . . . . . . . . . . . . . 22323

References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22424

Page 4: Lectures on Linear Algebra Philip Korman

Chapter 11

Systems of Linear Equations2

1.1 Gaussian Elimination3

The equation with two variables x and y4

(1.1) 2x− y = 3

is an example of a linear equation. Geometrically, this equation describes5

a straight line of slope 2 (write it as y = 2x − 3). The point (2, 1) with6

x = 2 and y = 1 is a solution of the equation (1.1) so that it lies on this line,7

while the point (3, 1) does not satisfy the equation, and it lies off our line.8

The equation (1.1) has infinitely many solutions representing geometrically9

a line. Similarly the equation10

4x + y = 9

has infinitely many solutions. Now let us put these equations together, and11

solve the following system of two equations with two unknowns12

2x− y = 3

4x + y = 9 .

We need to find the point (or points) that lie on both lines, or the point13

of intersection. The lines are not parallel, so that there is a unique point14

of intersection. To find its coordinates, we solve this system by adding the15

equations:16

6x = 12 ,

so that x = 2. To find y, we use the value of x = 2 in the first equation:17

2 · 2 − y = 3 ,

4

Page 5: Lectures on Linear Algebra Philip Korman

1.1. GAUSSIAN ELIMINATION 5

so that y = 1.1

We used an opportunity to eliminate y when solving this system. A more2

systematic approach will be needed to solve larger systems, say a system of3

four equations with five unknowns. We indicate such an approach next.4

Observe that multiplying one of the equations by a constant will not change5

the solution set. Similarly the solution set is preserved when adding or6

subtracting the equations. For example, if the first equation is multiplied7

by 2 (to get 4x − 2y = 6) the solution set is not changed.8

From the second equation we subtract the first one, multiplied by two9

(subtract 4x − 2y from the left side of the second equation, and subtract 610

from the right side of the second equation). The new system11

2x − y = 3

3y = 3

has the same solution set (an equivalent system). The x variable is elimi-12

nated in the second equation. From the second equation obtain y = 1, and13

substituting this value of y back into the first equation gives 2x− 1 = 3, or14

x = 2. Answer: x = 2 and y = 1. (The lines intersect at the point (2, 1).)15

Proceeding similarly, the system16

2x + y = 3

−8x − 4y = −12

is solved by adding to the second equation the first one multiplied by 4:17

2x + y = 3

0 = 0 .

The second equation carries no information, and is discarded:18

2x + y = 3 .

Answer: this system has infinitely many solutions, consisting of all pairs19

(x, y) (points (x, y)) lying on the line 2x + y = 3. One can present the20

answer in several ways: y = −2x + 3 with x arbitrary, x = −12y + 3

2 with y21

arbitrary, or y = t and x = −12 t + 3

2 , with t arbitrary. Geometrically, both22

equations of this system define the same line. That line intersects itself at23

all of its points.24

Page 6: Lectures on Linear Algebra Philip Korman

6 CHAPTER 1. SYSTEMS OF LINEAR EQUATIONS

For the system1

2x − 3y = −1

2x − 3y = 0

subtracting from the second equation the first one gives2

2x − 3y = −1

0 = 1 .

The second equation will never be true, no matter what x and y are. Answer:3

this system has no solutions. One says that this system is inconsistent.4

Geometrically, the lines 2x−3y = −1 and 2x−3y = 0 are parallel, and have5

no points of intersection.6

The system7

2x− y = 3

4x + y = 9

x − y = −12

has three equations, but only two unknowns. If one considers only the8

first two equations, one recognizes the system of two equations with two9

unknowns that was solved above. The solution was x = 2 and y = 1. The10

point (2, 1) is the only one with a chance to be a solution of the entire11

system. For that it must lie on the third line x − y = −1

2. It does not.12

Answer: this system has no solutions, it is inconsistent. Geometrically, the13

third line misses the point of intersection of the first two lines.14

The system of two equations15

2x − y + 5z = 1

x + y + z = −2

affords us a “luxury” of three variables x, y and z to satisfy it. To eliminate16

x in the second equation we need to subtract from it the first equation17

multiplied by 12 . (From the second equation subtract x− 1

2y +

5

2z =

1

2.) To18

avoid working with fractions, let us switch the order of equations19

x + y + z = −2

2x − y + 5z = 1

Page 7: Lectures on Linear Algebra Philip Korman

1.1. GAUSSIAN ELIMINATION 7

which clearly results in an equivalent system. Now to eliminate x in the sec-1

ond equation we subtract from it the first equation multiplied by 2. Obtain:2

x + y + z = −2

−3y + 3z = 5 .

We now set z = t, an arbitrary number. Then from the second equation3

we shall obtain y as a function of t. Finally, from the first equation x is4

expressed as a function of t. Details: from the second equation5

−3y + 3t = 5 ,

giving y = t − 5

3. Then from the first equation6

x + t − 5

3+ t = −2 ,

so that x = −2t − 1

3. Answer: this system has infinitely many solutions of7

the form x = −2t − 1

3, y = t − 5

3, z = t, and t is an arbitrary number. One8

can present this answer in vector form:9

xy

z

=

−2t − 13

t − 53

t

= t

−21

1

− 1

3

15

0

.

The next example involves a three by three system10

x − y + z = 4

−2x + y − z = −5

3x + 4z = 11

of three equations with three unknowns. Our plan is to eliminate x in the11

second and third equations. These two operations are independent of each12

other and can be performed simultaneously (in parallel). To the second13

equation we add the first one multiplied by 2, and from the third equation14

subtract the first one multiplied by 3. Obtain:15

x − y + z = 4

−y + z = 3

3y + z = −1

Page 8: Lectures on Linear Algebra Philip Korman

8 CHAPTER 1. SYSTEMS OF LINEAR EQUATIONS

Our next goal is to eliminate y in the third equation. To the third equation1

we add the second one multiplied by 3. (If we used the first equation to do2

this task, then x would reappear in the third equation, negating our work3

to eliminate it.) Obtain:4

x − y + z = 4

−y + z = 3

4z = 8 .

5

We are finished with the elimination process, also called forward elim-6

ination. Now the system can be quickly solved by back-substitution: from7

the third equation we calculate z = 2. Using this value of z in the second8

equation, one finds y. Using these values of y and z in the first equation,9

one finds x. Details: from the second equation −y + 2 = 3 giving y = −1.10

From the first equation x+ 1 + 2 = 4 so that x = 1. Answer: x = 1, y = −111

and z = 2. Geometrically, the three planes defined by the three equations12

intersect at the point (1,−1, 2).13

Our examples suggest the following rule of thumb: if there are more vari-14

ables than equations, the system is likely to have infinitely many solutions.15

If there are more equations than variables, the system is likely to have no16

solutions. And if the numbers of variables and equations are the same, the17

system is likely to have a unique solution. This rule does not always apply.18

For example, the system19

x − y = 2

−2x + 2y = −4

3x − 3y = 6

has more equations than unknowns, but the number of solutions is infinite,20

because all three equations define the same line. On the other hand, the21

system22

x − 2y + 3z = 2

2x − 4y + 6z = −4

has more variables than equations, but there are no solutions, because the23

equations of this system define two parallel planes.24

Page 9: Lectures on Linear Algebra Philip Korman

1.1. GAUSSIAN ELIMINATION 9

The method for solving linear systems described in this section is known1

as Gaussian elimination, named in honor of C.F. Gauss, a famous German2

mathematician.3

Exercises4

1. Solve the following systems by back-substitution.5

a. x + 3y = −1

−2y = 1 .

6

Answer. x = 12 , y = −1

2 .7

b. x + y + 3z = 1

y − z = 2

2z = −2 .

8 c. x + 4z = 2

2y − z = 5

−3z = −3 .

9Answer. x = −2, y = 3, z = 1.10

d. x − y + 2z = 0

y − z = 3 .

11

Answer. x = −t + 3, y = t + 3, z = t, where t is arbitrary.12

e. x + y − z − u = 2

3y − 3z + 5u = 3

2u = 0 .

Answer. x = 1, y = t + 1, z = t, u = 0, where t is arbitrary.13

2. Solve the following systems by Gaussian elimination (or otherwise), and14

if possible interpret your answer geometrically.15

a. x + 3y = −1

−x − 2y = 3 .

16

Answer. x = −7, y = 2. Two lines intersecting at the point (−7, 2).17

Page 10: Lectures on Linear Algebra Philip Korman

10 CHAPTER 1. SYSTEMS OF LINEAR EQUATIONS

b. 2x − y = 3

x + 2y = 4

−x + 5y = 3 .

1 Answer. x = 2, y = 1. Three lines intersecting at the point (2, 1).2

c. x + 2y = −1

−2x − 4y = 3 .

3

Answer. There is no solution, the system is inconsistent. The lines are4

parallel.5

d. x + 2y = −1

−2x − 4y = 2 .

6

Answer. There are infinitely many solutions, consisting of all points on the7

line x + 2y = −1.8

e. x + y + z = −2

x + 2y = −3

x − y − z = 4 .

9

Answer. x = 1, y = −2, z = −1. Three planes intersect at the unique point10

(1,−2,−1).11

f. x − y + 2z = 0

x + z = 3

2x − y + 3z = 3 .

12

Answer. x = −t + 3, y = t + 3, z = t, where t is arbitrary.13

g. x − 2y + z = 1

2x − 4y + 2z = 3

4x − y + 3z = 5 .

14

Answer. There are no solutions (the system is inconsistent). The first two15

planes are parallel.16

Page 11: Lectures on Linear Algebra Philip Korman

1.2. USING MATRICES 11

3. Three points, not lying on the same line, uniquely determine the plane1

passing through them. Find an equation of the plane passing through the2

points (1, 0, 2), (0, 1, 5), (2, 1, 1).3

Answer. 2x− y + z = 4. Hint. Starting with ax + by + cz = d, obtain three4

equations for a, b, c and d. There are infinitely many solutions, depending5

on a parameter t. Select the value of t giving the simplest looking answer.6

4. Find the number a, so that the system7

2x − 3y = −1

ax − 6y = 5 .

8

has no solution. Can one find a number a, so that this system has infinitely9

many solutions?10

1.2 Using Matrices11

We shall deal with linear systems possibly involving large number of un-12

knowns. Instead of denoting the variables x, y, z, . . ., we shall write x1, x2,13

x3, . . . , xn, and n is an arbitrary number. Our next example is14

x1 − x2 + x3 = −1

2x1 − x2 + 2x3 = 0

−3x1 + 4x3 = −10 .

The first step of Gaussian elimination is to subtract from the second equation15

the first one multiplied by 2. This will involve working with the coefficients16

of x1, x2, x3. So let us put these coefficients into a matrix (or a table)17

1 −1 12 −1 2

−3 0 4

called the matrix of the system. It has 3 rows and 3 columns. When this18

matrix is augmented with the right hand sides of the equations19

1 −1 1 −1

2 −1 2 0−3 0 4 −10

Page 12: Lectures on Linear Algebra Philip Korman

12 CHAPTER 1. SYSTEMS OF LINEAR EQUATIONS

one obtains the augmented matrix. Subtracting from the second equation1

the first one multiplied by 2 is the same as subtracting from the second row2

of the augmented matrix the first one multiplied by 2. Then, to the third3

row we add the first one multiplied by 3. Obtain:4

1© −1 1 −1

0 1 0 20 −3 7 −13

.

We circled the element, called pivot, used to produce two zeroes in the5

augmented matrix. To the third row add 3 times the second:6

1© −1 1 −1

0 1© 0 20 0 7© −7

.

Two more pivots are circled. All elements under the diagonal ones are now7

zero. Restore the system corresponding to the last augmented matrix (a8

step that will be skipped later)9

x1 − x2 + x3 = −1

x2 = 2

7x3 = −7 .

This system is equivalent to the original one. Back-substitution produces10

x3 = −1, x2 = 2, and from the first equation11

x1 − 2 − 1 = −1,

or x1 = 2.12

The next example is13

3x1 + 2x2 − 4x3 = 1

x1 − x2 + x3 = 2

5x2 − 7x3 = −1 ,

with the augmented matrix14

3 2 −4 1

1 −1 1 20 5 −7 −1

.

Page 13: Lectures on Linear Algebra Philip Korman

1.2. USING MATRICES 13

(Observe that we could have started this example with the augmented ma-1

trix, as well.) The first step is to subtract from the second row the first2

one multiplied by −1

3. To avoid working with fractions, we interchange the3

first and the second rows (this changes the order of equations, giving an4

equivalent system):5

1 −1 1 2

3 2 −4 10 5 −7 −1

.

Subtract from the second row the first one multiplied by 3. We shall denote6

this operation by R2 − 3R1, for short. (R2 and R1 refer to row 2 and row 1,7

respectively.) Obtain:8

1© −1 1 20 5 −7 −5

0 5 −7 −1

.

There is a “free” zero at the beginning of third row R3, so we move on to9

the second column and perform R3 − R2:10

1© −1 1 2

0 5© −7 −50 0 0 4

.

The third equation says: 0x1 + 0x2 + 0x3 = 4, or11

0 = 4 .

The system is inconsistent, there is no solution.12

The next example we begin with the augmented matrix13

3 2 −4 11 −1 1 2

0 5 −7 −5

.

This system is a small modification of the preceding one, with only the14

right hand side of the third equation is different. The same steps of forward15

elimination lead to16

1© −1 1 2

0 5© −7 −50 0 0 0

.

Page 14: Lectures on Linear Algebra Philip Korman

14 CHAPTER 1. SYSTEMS OF LINEAR EQUATIONS

The third equation now says 0 = 0, and is discarded. There are pivots in1

columns one and two corresponding to the variables x1 and x2 respectively.2

We call x1 and x2 the pivot variables. In column three there is no pivot3

(pivot is a non-zero element, used to produce zeroes). The corresponding4

variable x3 is called free variable. We now restore the system, move the5

terms involving the free variable x3 to the right, let x3 be arbitrary, and6

then solve for the pivot variables x1 and x2 in terms of x3. Details:7

x1 − x2 + x3 = 2

5x2 − 7x3 = −5 ,8

x1 − x2 = −x3 + 2(2.1)

5x2 = 7x3 − 5 .

From the second equation9

x2 =7

5x3 − 1 .

From the first equation of the system (2.1) express x110

x1 = x2 − x3 + 2 =7

5x3 − 1 − x3 + 2 =

2

5x3 + 1 .

Answer: x1 =2

5x3 + 1, x2 =

7

5x3 − 1, and x3 is arbitrary (“free”). We11

can set x3 = t, an arbitrary number, and present the answer in the form12

x1 =2

5t + 1, x2 =

7

5t − 1, x3 = t.13

Moving on to larger systems, consider a four by four system14

x2 − x3 + x4 = 2

2x1 + 6x2 − 2x4 = 4

x1 + 2x2 + x3 − 2x4 = 0

x1 + 3x2 − x4 = 2 ,

with the augmented matrix15

0 1 −1 1 22 6 0 −2 4

1 2 1 −2 01 3 0 −1 2

.

Page 15: Lectures on Linear Algebra Philip Korman

1.2. USING MATRICES 15

We need a non-zero element (or pivot) at the beginning of row one. For that1

we may switch row one R1 with any other row, but to avoid fractions we do2

not switch with row two. Let us switch row one R1 with row three R3. We3

shall denote this operation by R1 ↔ R3, for short. Obtain:4

1 2 1 −2 0

2 6 0 −2 40 1 −1 1 2

1 3 0 −1 2

.

Perform R2 − 2R1 and R4 − R1. Obtain:5

1© 2 1 −2 0

0 2© −2 2 40 1 −1 1 20 1 −1 1 2

.

To produce zeroes in the second column under the diagonal, perform R3 −6

1

2R2 and R4 −

1

2R2. Obtain:7

1© 2 1 −2 0

0 2© −2 2 40 0 0 0 0

0 0 0 0 0

.

The next step is optional: multiply the second row by1

2. We shall denote8

this operation by1

2R2. This gives a little simpler matrix:9

1© 2 1 −2 00 1© −1 1 2

0 0 0 0 00 0 0 0 0

.

The pivot variables are x1 and x2, while x3 and x4 are free. Restore the sys-10

tem (the third and fourth equations are discarded), move the free variables11

to the right, and solve for pivot variables:12

x1 + 2x2 + x3 − 2x4 = 0

x2 − x3 + x4 = 2 ,

Page 16: Lectures on Linear Algebra Philip Korman

16 CHAPTER 1. SYSTEMS OF LINEAR EQUATIONS

1

x1 + 2x2 = −x3 + 2x4

x2 = x3 − x4 + 2 .

The second equation gives us x2. Then from the first equation2

x1 = −2x2 − x3 + 2x4 = −2 (x3 − x4 + 2)− x3 + 2x4 = −3x3 + 4x4 − 4 .

Answer: x1 = −3x3 +4x4 −4, x2 = x3 −x4 +2, x3 and x4 are two arbitrary3

numbers. We can set x3 = t and x4 = s, two arbitrary numbers, and present4

the answer in the form x1 = −3t + 4s − 4, x2 = t − s + 2, x3 = t, x4 = s.5

The next system of three equations with four unknowns is given by its6

augmented matrix7

1 −1 0 2 3−1 1 2 1 −1

2 −2 4 0 10

.

Performing R2 +R1 and R3−2R1 produces zeroes in the first column under8

the diagonal term (the pivot)9

1© −1 0 2 30 0 2 3 2

0 0 4 −4 4

.

Moving on to the second column, there is zero in the diagonal position.10

We look under this zero for a non-zero element, in order to change rows11

and obtain a pivot. There is no such non-zero element, so we move on to12

the third column (the second column is left without a pivot), and perform13

R3 − 2R2:14

1© −1 0 2 3

0 0 2© 3 20 0 0 -10© 0

.

The augmented matrix is reduced to its row echelon form. (Looking from15

the left, one sees in each row zeroes followed by a pivot). Here the pivot16

variables are x1, x3 and x4, while x2 is free variable. The last equation17

−10x4 = 0 implies that x4 = 0. Restore the system, keeping in mind that18

x4 = 0, then take the free variable x2 to the right:19

x1 = 3 + x2

2x3 = 2 .

Page 17: Lectures on Linear Algebra Philip Korman

1.2. USING MATRICES 17

Answer: x1 = 3 + x2, x3 = 1, x4 = 0 and x2 is arbitrary.1

Observe that no two pivots occupy the same row or the same column2

(each pivot occupies its own row, and its own column).3

We summarize the strategy for solving linear systems. After row reducing4

the matrix, move the free variables to the right, and let them be arbitrary5

numbers. Then solve for the pivot variables.6

1.2.1 Complete Forward Elimination7

Let us re-visit the system8

1 −1 1 −12 −1 2 0

−3 0 4 −10

.

Forward elimination (R2 − 2R1, R3 + 3R1, followed by R3 + 3R2) gave us9

1© −1 1 −1

0 1© 0 20 0 7© −7

.

Then we restored the system, and quickly solved it by back-substitution.10

However, one can continue to simplify the matrix of the system. First, we11

shall make all pivots equal to 1. To that end, the third row is multiplied by12

1

7, an elementary operation denoted by

1

7R3. Obtain:13

1© −1 1 −1

0 1© 0 20 0 1© −1

.

Now we shall use the third pivot to produce zeroes in the third column above14

it, and then use the second pivot to produce a zero above it. (In this order!)15

Performing R1 − R3 gives16

1© −1 0 00 1© 0 2

0 0 1© −1

.

(The other zero in the third column we got for free.) Now perform R1 +R2:17

1© 0 0 2

0 1© 0 20 0 1© −1

.

Page 18: Lectures on Linear Algebra Philip Korman

18 CHAPTER 1. SYSTEMS OF LINEAR EQUATIONS

The point of the extra elimination steps is that restoring the system imme-1

diately produces the answer x1 = 2, x2 = 2, x3 = −1.2

Exercises3

1. The following augmented matrices are in row echelon form. Circle the4

pivots, then restore the corresponding systems and solve them by back-5

substitution.6

a.7

[

2 −1 00 3 6

]

.

8

b.9

[

2 −2 40 0 0

]

.

10

c.11

[

4 −1 50 0 3

]

.

Answer. No solution.12

d.13

2 −1 0 30 3 1 1

0 0 2 −4

.

Answer. x1 = 2, x2 = 1, x3 = −2.14

e.15

[

1 −1 1 30 1 2 −1

]

.

Answer. x1 = −3t + 2, x2 = −2t − 1, x3 = t, t is arbitrary.16

f.17

[

2 −1 0 2

0 0 1 −4

]

.

Answer. x1 = 12 t + 1, x2 = t, x3 = −4.18

g.19

5 −1 2 30 3 1 −1

0 0 0 −4

.

Answer. The system is inconsistent (no solution).20

Page 19: Lectures on Linear Algebra Philip Korman

1.2. USING MATRICES 19

2. For the following systems write down the augmented matrix, reduce it to1

the row echelon form, then solve the system by back-substitution. Which2

variables are pivot variables, and which ones are free? Circle the pivots.3

a.4 13x1 − 1

3x2 = 1

2x1 + 6x2 = −2 .

5

b.6 x2 − x3 = 1

x1 + 2x2 + x3 = 0

3x1 + x2 + 2x3 = 1 .

7

Answer. x = 1, y = 0, z = −1.8

c.9 3x1 − 2x2 − x3 = 0

x1 + 2x2 + x3 = −1

x1 − 6x2 − 3x3 = 5 .

10

Answer. No solution.11

d.12

3x1 − 2x2 − x3 = 0

x1 + 2x2 + x3 = −1

x1 − 6x2 − 3x3 = 2 .

13

Answer. x1 = −14 , x2 = −1

2 t − 38 , x3 = t.14

e.15

x1 − x2 + x4 = 1

2x1 − x2 + x3 + x4 = −3

x2 + x3 − x4 = −5 .

Answer. x1 = −t − 4, x2 = −t + s − 5, x3 = t, x4 = s.16

3. Solve the following systems given by their augmented matrices.17

a.18

1 −2 0 2

2 3 1 −41 5 1 −5

.

Answer. No solution.19

b.20

1 −2 −3 1

2 −3 −1 43 −5 −4 5

.

Page 20: Lectures on Linear Algebra Philip Korman

20 CHAPTER 1. SYSTEMS OF LINEAR EQUATIONS

Answer. x = −7t + 5, y = −5t + 2, z = t.1

c.2

1 −2 −1 3 1

2 −4 1 0 51 −2 2 −3 4

.

Answer. x1 = −t + 2s + 2, x2 = s, x3 = 2t + 1, x4 = t.3

d.4

1 −1 0 1 02 −2 1 −1 1

3 −3 2 0 2

.

Answer. x1 = t, x2 = t, x3 = 1, x4 = 0.5

e.6

0 0 3 6

0 1 −2 01 0 1 1

.

Answer. x1 = −1, x2 = 4, x3 = 2.7

4. Solve again the systems in 2(a) and 2(b) by performing complete Gaussian8

elimination.9

5. What is the maximal possible number of pivots for the matrices of the10

following sizes.11

a. 5× 6. b. 11× 3. c. 7× 1. d. 1 × 8. e. n × n.12

1.3 Vector Interpretation of Linear Equations13

Given two three-dimensional vectors C1 =

1

−13

and C2 =

5

−42

, we14

may add them by adding the corresponding components C1+C2 =

6−5

5

,15

or multiply C1 by a number x1 (componentwise): x1C1 =

x1

−x1

3x1

, or16

calculate their linear combination17

x1C1 + x2C2 =

x1 + 5x2

−x1 − 4x2

3x1 + 2x2

,

Page 21: Lectures on Linear Algebra Philip Korman

1.3. VECTOR INTERPRETATION OF LINEAR EQUATIONS 21

where x2 is another scalar (number). Given a vector b =

−3

24

, let us try1

to find the numbers x1 and x2, so that2

x1C1 + x2C2 = b .

In components, we need3

x1 + 5x2 = −3

−x1 − 4x2 = 2

3x1 + 2x2 = 4 .

But that is just a three by two system of equations! It has a unique solution4

x1 = 2 and x2 = −1, found by Gaussian elimination. So that5

b = 2C1 − C2 .

The vector b is a linear combination of the vectors C1 and C2. Geometrically,6

the vector b lies in the plane determined by the vectors C1 and C2 (this plane7

passes through the origin). One also says that b belongs to the span of the8

vectors C1 and C2, denoted by Span{C1, C2}, and defined to be the set of all9

possible linear combinations x1C1 +x2C2. (Similarly, Span{C1, C2, . . . , Ck}10

is the set of all possible linear combinations x1C1 +x2C2 + · · ·+xkCk.) The11

columns of the augmented matrix of this system12

1 5 −3

−1 −4 23 2 4

are precisely the vectors C1, C2, and b. We can write the augmented matrix13

as [C1 C2... b] by listing its columns.14

In place of b, let us consider another vector B =

−3

21

, and again try15

to find the numbers x1 and x2, so that16

C1x1 + C2x2 = B .

Page 22: Lectures on Linear Algebra Philip Korman

22 CHAPTER 1. SYSTEMS OF LINEAR EQUATIONS

In components, this time we need1

x1 + 5x2 = −3

−x1 − 4x2 = 2

3x1 + 2x2 = 1 .

This three by two system of equations has no solutions, as follows by Gaus-2

sian elimination. The vector B does not lie in the plane determined by the3

vectors C1 and C2 (equivalently, B is not a linear combination of the vectors4

C1 and C2, so that B does not belong to Span{C1, C2}). The columns of5

the augmented matrix for the last system6

1 5 −3

−1 −4 23 2 1

= [C1 C2... B]

are the vectors C1, C2, and B.7

The above examples illustrate that a system with the augmented matrix8

[C1 C2... b] has a solution exactly when (if and only if) the vector of the9

right hand sides b belongs to the span Span{C1, C2}. Observe that C1 and10

C2 are the columns of the matrix of the system.11

Similarly, a system of three equations with three unknowns and the12

augmented matrix [C1 C2 C3... b] has a solution if and only if the vector13

of the right hand sides b belongs to the span Span{C1, C2, C3}. In other14

words, b is a linear combination of C1, C2 and C3 if and only if the system15

with the augmented matrix [C1 C2 C3... b] is consistent (has solutions). The16

same is true for systems of arbitrary size, say a system of seven equations17

with eleven unknowns (the columns of its matrix will be seven-dimensional18

vectors). We discuss vectors of arbitrary dimension next.19

In Calculus and Physics one deals with either two-dimensional or three-20

dimensional vectors. The set of all possible two-dimensional vectors is de-21

noted by R2, while R3 denotes all vectors in the three-dimensional space we22

live in. By analogy, Rn is the set of all possible n-dimensional vectors of the23

form

a1

a2...

an

, which can be added or multiplied by a scalar the same way24

Page 23: Lectures on Linear Algebra Philip Korman

1.3. VECTOR INTERPRETATION OF LINEAR EQUATIONS 23

as in R2 or in R3. For example, one adds two vectors in R41

a1

a2

a3

a4

+

b1

b2

b3

b4

=

a1 + b1

a2 + b2

a3 + b3

a4 + b4

.

by adding the corresponding components. If c is a scalar, then2

c

a1

a2

a3

a4

=

c a1

c a2

c a3

c a4

.

It is customary to use boldface (or capital) letters when denoting vectors,3

for example a =

a1

a2

a3

a4

, b =

b1

b2

b3

b4

. Usual algebra rules apply to vectors,4

for example5

b + a = a + b ,6

c (a + b) = c a + c b ,

for any scalar c.7

We say that a matrix A is of size (or of type) m×n if it has m rows and8

n columns. For example, the matrix9

A =

[

1 −1 2−1 0 4

]

is of size 2 × 3. It has three columns a1 =

[

1−1

]

, a2 =

[

−10

]

, and10

a3 =

[

24

]

, which are vectors in R2. One can write the matrix A through11

its columns12

A = [ a1 a2 a3 ] .

A matrix A is of size m × n13

A = [ a1 a2 . . . an ]

has n columns, and each of them is a vector in Rm.14

Page 24: Lectures on Linear Algebra Philip Korman

24 CHAPTER 1. SYSTEMS OF LINEAR EQUATIONS

The augmented matrix for a system of m equations with n unknowns1

has the form [ a1 a2 . . . an

... b ], and each column is a vector in Rm. The2

system is consistent (it has a solution) if and only if the vector of the right3

hand sides b belongs to the span Span{a1, a2, . . . , an}.4

One defines the product Ax of an m× n matrix A = [ a1 a2 . . . an ] and5

of vector x =

x1

x2...

xn

in Rn as the following linear combination of columns6

of A7

A x = [ a1 a2 . . . an ]

x1

x2...

xn

= x1a1 + x2a2 + · · ·+ xnan .

The vector Ax belongs to Rm. For example,8

[

1 −1 2−1 0 4

]

3

−21

= 3

[

1−1

]

+ (−2)

[

−10

]

+ 1

[

24

]

=

[

71

]

.

If y =

y1

y2...

yn

is another vector in Rn, it is straightforward to verify that9

A (x + y) = Ax + Ay .

One also checks that10

A(cx) = cAx ,

for any scalar c.11

The matrix of the system12

x1 − x2 + 3x3 = 2(3.1)

2x1 + 6x2 − 2x3 = 4

5x1 + 2x2 + x3 = 0

Page 25: Lectures on Linear Algebra Philip Korman

1.3. VECTOR INTERPRETATION OF LINEAR EQUATIONS 25

is A =

1 −1 3

2 6 −25 2 1

, and the vector of right hand sides is b =

2

40

.1

Define x =

x1

x2

x3

, the vector of unknowns. (Here we do not use boldface2

letters to denote the vectors b and x.) Calculate3

A x =

1 −1 3

2 6 −25 2 1

x1

x2

x3

=

x1 − x2 + 3x3

2x1 + 6x2 − 2x3

5x1 + 2x2 + x3

.

It follows that the system (3.1) can be written in the form4

(3.2) Ax = b .

Any m × n linear system can be written in the form (3.2), where A is the5

m × n matrix if the system, and b is the vector of right hand sides.6

Analogy is a key concept when dealing with objects in dimensions greater7

than three. Suppose a four-dimensional spaceship of the form of four-8

dimensional ball (x21 + x2

2 + x23 + x2

4 ≤ R2) passes by us. What will we9

see? By analogy, imagine people living in a plane (or flatland) and a three-10

dimensional ball passes by. At first they see nothing (the ball is out of their11

plane), then they see a point, then an expanding disc, then a contracting12

disc, followed by a point, and then they see nothing again. Can you now13

answer the original question? (One will see: nothing, one point, expanding14

balls, contracting balls, one point, nothing.)15

Exercises16

1. Express the vector b =

104

as a linear combination of the vectors C1 =17

1

01

, C2 =

0

−11

, and C3 =

1

23

. In other words, find the numbers18

x1, x2, x3 so that b = x1C1+x2C2+x3C3. Write down the augmented matrix19

for the corresponding system of equations.20

Answer. x1 = 14 , x2 = 3

2 , x3 = 34 .21

Page 26: Lectures on Linear Algebra Philip Korman

26 CHAPTER 1. SYSTEMS OF LINEAR EQUATIONS

2. Is it possible to express the vector b =

5

3−3

as a linear combination1

of the vectors C1 =

11

−1

, C2 =

21

−1

, and C3 =

32

−2

?2

Answer. Yes.3

3. Is it possible to express the vector b =

54

1−3

as a linear combination4

of the vectors C1 =

01

1−1

, C2 =

0−2

1−1

, and C3 =

01

2−2

?5

Answer. No.6

4. Calculate the following products involving a matrix and a vector.7

a.

[

1 2

−1 1

] [

3

−2

]

. Answer.

[

−1

−5

]

.8

b.

1 2 00 −1 1

1 −2 1

x1

x2

x3

. Answer.

x1 + 2x2

−x2 + x3

x1 − 2x2 + x3

.9

c.

[

1 −2 03 −1 1

]

12

3

.10

d.

−1 20 −1

1 43 0

[

−1

2

]

. Answer.

5−2

7−3

.11

e.[

3 −1 1]

1

03

. Answer. 6.12

5. Does the vector b lie in the plane determined by the vectors C1 and C2?13

a. b =

0

1−4

, C1 =

2

1−2

, C2 =

1

01

.14

Page 27: Lectures on Linear Algebra Philip Korman

1.4. SOLUTION SET OF A LINEAR SYSTEM AX = B 27

Answer. Yes.1

b. b =

5

1−4

, C1 =

2

−10

, C2 =

1

−30

.2

Answer. No.3

c. b =

2

1−2

, C1 =

2

−13

, C2 =

−4

−24

.4

Answer. Yes.5

d. b =

2−4

5

, C1 =

3−1

1

, C2 =

−1−3

2

.6

Answer. No.7

6. Does the vector b belong to Span{C1, C2, C3}?8

a. b =

11

1

, C1 =

10

0

, C2 =

01

0

, C3 =

11

0

.9

Answer. No.10

b. b =

1

11

, C1 =

1

00

, C2 =

0

10

, C3 =

0

01

.11

Answer. Yes.12

7. Let A be of size 4 × 5, and x is in R4. Is the product Ax defined?13

8. Let A be of size 7 × 8, and x is in R8. Is the product Ax defined?14

1.4 Solution Set of a Linear System Ax = b15

When all right hand sides are zero the system is called homogeneous:16

(4.1) Ax = 0 .

On the right in (4.1) is the zero vector, or a vector with all components equal17

to zero (sometimes denoted 0). The matrix A is of size m × n. The vector18

Page 28: Lectures on Linear Algebra Philip Korman

28 CHAPTER 1. SYSTEMS OF LINEAR EQUATIONS

of unknowns x is in Rn. The system (4.1) always has a solution x = 0, or1

x1 = x2 = · · · = xn = 0, called the trivial solution. We wish to find all2

solutions.3

Our first example is the homogeneous system4

x1 − x2 + x3 = 0

−2x1 + x2 − x3 = 0

3x1 − 2x2 + 4x3 = 0 ,

with the augmented matrix5

1 −1 1 0−2 1 −1 0

3 −2 4 0

.

Forward elimination (R2 + 2R1, R3 − 3R1, followed by R3 + R2) leads to6

1© −1 1 00 -1© 1 0

0 0 2© 0

,

or7

x1 − x2 + x3 = 0

−x2 + x3 = 0

2x3 = 0 .

Back-substitution gives x1 = x2 = x3 = 0, the trivial solution. There are8

three pivot variables, and no free variables. The trivial solution is the only9

solution of this system. Homogeneous system must have free variables, in10

order to have non-trivial solutions.11

Our next example has the augmented matrix12

1 −1 1 0−2 1 −1 0

3 −2 2 0

,

which is a small modification of the preceding system, with only one entry13

of the third row changed. The same steps of forward elimination (R2 +2R1,14

R3 − 3R1, followed by R3 + R2) lead to15

Page 29: Lectures on Linear Algebra Philip Korman

1.4. SOLUTION SET OF A LINEAR SYSTEM AX = B 29

1© −1 1 0

0 -1© 1 00 0 0 0

,

or1

x1 − x2 + x3 = 0

−x2 + x3 = 0 ,

after discarding a row of zeroes. Solving for the pivot variables x1, x2 in2

terms of the free variable x3, obtain infinitely many solutions: x1 = 0,3

x2 = x3, and x3 is arbitrary number. Write this solution in vector form4

x1

x2

x3

=

0

x3

x3

= x3

0

11

= x3 u ,

where u =

011

. It is customary to set x3 = t, then the solution set of this5

system is given by t u, all possible multiples of the vector u. Geometrically,6

the solution set consists of all vectors lying on the line through the origin7

parallel to u, or Span{u}.8

The next example is a homogeneous system of four equations with four9

unknowns given by its augmented matrix10

1 0 −1 1 0

−2 1 3 4 0−1 1 2 5 0

5 −2 −7 −7 0

.

Forward elimination steps R2 + 2R1, R3 + R1, R4 − 5R1 give11

1 0 −1 1 00 1 1 6 0

0 1 1 6 00 −2 −2 −12 0

.

Then perform R3 − R2 and R4 + 2R2:12

1© 0 −1 1 00 1© 1 6 0

0 0 0 0 00 0 0 0 0

.

Page 30: Lectures on Linear Algebra Philip Korman

30 CHAPTER 1. SYSTEMS OF LINEAR EQUATIONS

Restore the system1

x1 − x3 + x4 = 0

x2 + x3 + 6x4 = 0 ,

solve for the pivot variables x1, x2 in terms of the free ones x3, x4, then set2

x3 = t and x4 = s, two arbitrary numbers. Obtain infinitely many solutions:3

x1 = t− s, x2 = −t− 6s, x3 = t, and x4 = s. Writing this solution in vector4

form5

t − s

−t − 6st

s

= t

1

−11

0

+ s

−1

−60

1

= t u + s v ,

we see that the solution set is a linear combination of the vectors u =6

1

−11

0

and v =

−1

−60

1

, or Span{u, v}.7

In general, if the number of free variables is k, then the solution set of8

an m × n homogeneous system Ax = 0 has the form Span{u1, u2, . . . , uk}9

for some vectors u1, u2, . . . , uk that are solutions of this system.10

An m × n homogeneous system Ax = 0 has at most m pivots, so that11

there is at most m pivot variables. That is because each pivot occupies its12

own row, and the number of rows is m. If n > m, there are more variables13

in total than pivot variables. Then some variables are free, and the system14

Ax = 0 has infinitely many solutions. For future reference this result is15

stated as a theorem.16

Theorem 1.4.1 An m × n homogeneous system Ax = 0, with n > m, has17

infinitely many solutions.18

Turning to non-homogeneous systems Ax = b, with b 6= 0, let us re-visit19

the system20

2x1 − x2 + 5x3 = 1

x1 + x2 + x3 = −2 ,

Page 31: Lectures on Linear Algebra Philip Korman

1.4. SOLUTION SET OF A LINEAR SYSTEM AX = B 31

for which we calculated earlier the solution set to be1

x1

x2

x3

= t

−2

11

− 1

3

1

50

= t u + p ,

with u =

−211

and p = −1

3

150

. Recall that t u represents vectors on2

a line through the origin parallel to the vector u. The vector p translates3

this line to a parallel one, off the origin. Let us consider the corresponding4

homogeneous system:5

2x1 − x2 + 5x3 = 0

x1 + x2 + x3 = 0 ,

with the right hand sides changed to zero. One calculates its solution set to6

be t u, with the same u. In general, the solution set of the system Ax = b7

is a translation by some vector p of the solution set of the corresponding8

homogeneous system Ay = 0. Indeed, if p is any particular solution of the9

non-homogeneous system, Ap = b, then A (p + y) = Ap + Ay = b, so that10

p + y gives the solution set of the non-homogeneous system.11

Exercises12

1. Let A =

1 2 −1

1 2 01 2 −1

, b1 =

2

32

, b2 =

−1

02

. Determine the13

solution set of the following systems. (Calculations for all three cases can14

be done in parallel.)15

a. Ax = 0.16

Answer. x = t

−2

10

.17

b. Ax = b1.18

Answer. x = t

−21

0

+

11

1

.19

Page 32: Lectures on Linear Algebra Philip Korman

32 CHAPTER 1. SYSTEMS OF LINEAR EQUATIONS

c. Ax = b2.1

Answer. The system is inconsistent (no solutions).2

2. Let A be a 4 × 5 matrix. How many solutions does the homogeneous3

system Ax = 0 have?4

3. Let A be a n × n matrix, with n pivots. Are there any solutions of the5

system Ax = 0, in addition to the trivial one?6

4. Let x1 = 2, x2 = 1 be a solution of some system Ax = b, with 2 × 27

matrix A. Assume that the solution set of the corresponding homogeneous8

system Ax = 0 is a line of slope −3 through the origin in the x1x2-plane.9

Describe geometrically the solution set of Ax = b.10

Answer. The line of slope −3 passing through the point (2, 1), or x2 =11

−3x1 + 5.12

5. Show that the system Ax = b has at most one solution if the correspond-13

ing homogeneous system Ax = 0 has only the trivial solution.14

Hint. Show that the difference of any two solutions of Ax = b satisfies the15

corresponding homogeneous system.16

6. Let x and y be two solutions of the homogeneous system Ax = 0.17

a. Show that x + y is also a solution of this system.18

b. Show that c1x + c2y is a solution of this system, for any scalars c1, c2.19

7. Let x and y be two solutions of a non-homogeneous system Ax = b, with20

non-zero vector b. Show that x + y is not a solution of this system.21

8. True or false?22

a. If a linear system of equations has a trivial solution, this system is23

homogeneous.24

b. If A of size 5 × 5 has 4 pivots, then the system Ax = 0 has non-trivial25

solutions.26

c. If A is a 4 × 5 matrix with 3 pivots, then the solution set of Ax = 027

involves one arbitrary constant.28

d. If A is a 5 × 6 matrix, then for any b the system Ax = b is consistent29

(has solutions).30

Page 33: Lectures on Linear Algebra Philip Korman

1.5. LINEAR DEPENDENCE AND INDEPENDENCE 33

1.5 Linear Dependence and Independence1

Given a set of vectors u1, u2, . . . , un in Rm, we look for the scalars (coef-2

ficients) x1, x2, . . . , xn which will make their linear combination to be zero3

vector4

(5.1) x1u1 + x2u2 + · · ·+ xnun = 0 .

The trivial combination x1 = x2 = · · · = xn = 0 clearly works. If the trivial5

combination is the only way to produce zero vector, we say that the vectors6

u1, u2, . . . , un are linearly independent. If any other combination gives zero7

vector, we say that the vectors u1, u2, . . . , un are linearly dependent. Suppose8

that these vectors are linearly dependent. Then (5.1) holds, with at least9

one of the coefficients not zero. Let us say, x1 6= 0. Writing x1u1 = −x2u2−10

· · · − xnun, express11

u1 = −x2

x1u2 − · · · − xn

x1un ,

so that u1 is a linear combination of the other vectors. Conversely, suppose12

that u1 is a linear combination of the other vectors u1 = y2u2 + · · ·+ ynun,13

with some coefficients y2, . . . , yn. Then14

(−1)u1 + y2u2 + · · ·+ ynun = 0 .

We have a non-trivial combination, with at least one of the coefficients non-15

zero (namely, (−1) 6= 0), producing zero vector. The vectors u1, u2, . . . , un16

are linearly dependent. Conclusion: a set of vectors is linearly dependent if17

and only if (exactly when) one of the vectors is a linear combination of the18

others.19

For two vectors u1, u2 linear dependence means that u1 = y2u2, so20

that the vectors are proportional, and they go along the same line. For21

three vectors u1, u2, u3 linear dependence implies that u1 = y2u2 + y3u322

(geometrically, if these vectors are in R3 they lie in the same plane).23

For example, a1 =

1−1

2

, a2 =

1−3

3

, and a3 =

11

1

are linearly24

dependent, because25

a2 = 2a1 − a3 .

while the vectors b1 =

1

−12

, b2 =

−2

2−4

, and b3 =

1

4−5

are linearly26

Page 34: Lectures on Linear Algebra Philip Korman

34 CHAPTER 1. SYSTEMS OF LINEAR EQUATIONS

dependent, because1

b1 =

(

−1

2

)

b2 + 0 b3 .

The vectors u1 =

20

0

, u2 =

1−3

0

, and u3 =

−11

3

, are linearly2

independent, because none of these vectors is a linear combination of the3

other two. Let us see why u2 is not a linear combination of u1 and u3.4

Indeed, if we had u2 = x1 u1 + x2 u3, or5

1

−30

= x1

2

00

+ x2

−1

13

,

then setting equal the third components gives x2 = 0, but then6

1−3

0

= x1

20

0

,

which is not possible. One shows similarly that u1 and u3 are not linear com-7

binations of the other two vectors. A more systematic approach is developed8

next.9

Vectors u1, u2, . . . , un in Rm are linearly dependent if the vector equation10

(5.1) has a non-trivial solution. In components, the vector equation (5.1) is11

an m× n homogeneous system with the augmented matrix [u1 u2 . . . un

... 0].12

Apply forward elimination. Non-trivial solutions exist if and only if there13

are free (non-pivot) variables. If there are no free variables (all columns14

have pivots), then the trivial solution is the only one. Since we are only15

interested in pivots, there is no need to carry a column of zeroes in the16

augmented matrix when performing row reduction.17

Algorithm: perform row reduction on the matrix [u1 u2 . . . un]. If the num-18

ber of pivots is less than n, the vectors u1, u2, . . . , un are linearly dependent.19

If the number of pivots is equal to n, the vectors u1, u2, . . . , un are linearly20

independent. (The number of pivots cannot exceed the number of columns21

n, because each pivot occupies its own column.)22

Example 1 Determine whether the vectors u1 =

1

23

, u2 =

4

56

,23

Page 35: Lectures on Linear Algebra Philip Korman

1.5. LINEAR DEPENDENCE AND INDEPENDENCE 35

and u3 =

0

11

are linearly dependent or independent.1

Using these vectors as columns, form the matrix2

1 4 0

2 5 13 6 1

.

Performing row reduction (R2−2R1, R3−3R1, followed by R3−2R2) gives3

1© 4 0

0 -3© 10 0 -1©

.

All three columns have pivots, there are no free variables. The vectors u1,4

u2, and u3 are linearly independent.5

Example 2 Let us re-visit the vectors u1 =

2

00

, u2 =

1

−30

, and6

u3 =

−11

3

from a previous example. Using these vectors as columns,7

form the matrix8

2© 1 −1

0 -3© 10 0 3©

,

which is already in row echelon form, with three pivots. The vectors are9

linearly independent.10

Example 3 Determine whether the vectors v1 =

10

−12

, v2 =

0−1

13

,11

and v3 =

1−1

05

are linearly dependent or independent. Using these vec-12

Page 36: Lectures on Linear Algebra Philip Korman

36 CHAPTER 1. SYSTEMS OF LINEAR EQUATIONS

tors as columns, form the matrix1

1 0 1

0 −1 −1−1 1 0

2 3 5

.

Performing row reduction (R3+R1, R4−2R1, followed by R3+R2, R4+3R2)2

gives3

1© 0 1

0 -1© −10 0 0

0 0 0

.

There is no pivot in the third column, so that the variable x3 is free. The4

vectors v1, v2, and v3 are linearly dependent. In fact, v3 = v1 + v2.5

If n > m, vectors u1, u2, . . . , un in Rm are linearly dependent. Indeed,6

row reduction on the matrix [u1 u2 . . . un] will produce no more that m piv-7

ots (each pivot occupies its own row), and hence there will be free variables.8

For example, any three (or more) vectors in R2 are linearly dependent. In9

R3 any four (or more) vectors are linearly dependent.10

There are other instances when linear dependence can be recognized at11

a glance. For example, if a set of vectors 0, u1, u2, . . . , un contains the zero12

vector 0. Indeed,13

1 · 0 + 0 · u1 + 0 · u2 + · · ·+ 0 · un = 0

is a non-trivial combination producing the zero vector. Another example:14

the set u1, 2u1, u3, . . . , un is linearly dependent. Indeed,15

(−2) · u1 + (1) · 2u1 + 0 · u3 + · · ·+ 0 · un = 0

is a non-trivial combination producing the zero vector. More generally, if a16

subset is linearly dependent, the entire set is linearly dependent.17

We shall need the following theorem.18

Theorem 1.5.1 Assume that the vectors u1, u2, . . . , un in Rm are linearly19

independent, and a vector w in Rm is not in their span. Then the vectors20

u1, u2, . . . , un, w are also linearly independent.21

Page 37: Lectures on Linear Algebra Philip Korman

1.5. LINEAR DEPENDENCE AND INDEPENDENCE 37

Proof: Assume, on the contrary, that the vectors u1, u2, . . . , un, w are1

linearly dependent. Then one can arrange for2

x1u1 + x2u2 + · · ·+ xnun + xn+1w = 0 ,

with at least one of the xi’s not zero. If xn+1 6= 0, we may solve this relation3

for w in terms of u1, u2, . . . , un, contradicting the assumption that w is not4

in the span of these vectors. If xn+1 = 0, it follows that5

x1u1 + x2u2 + · · ·+ xnun = 0 ,

with at least one of the xi’s not zero, contradicting the linear independence6

of u1, u2, . . . , un.7

So that assuming that the statement of the theorem is not true, leads to8

a contradiction (an impossible situation). Hence, the theorem is true. ♦9

The method of proof we just used is known as proof by contradiction.10

Exercises11

1. Determine if the following vectors are linearly dependent or independent.12

13

a.

2−1

03

,

−42

0−6

. Answer. Dependent.14

b.

−11

3

,

−22

7

. Answer. Independent.15

c.

1

−12

−34

,

0

02

−45

,

0

00

00

. Answer. Dependent.16

d.

−12

−3

,

02

−4

,

−22

−2

. Answer. Dependent.17

Page 38: Lectures on Linear Algebra Philip Korman

38 CHAPTER 1. SYSTEMS OF LINEAR EQUATIONS

e.

1

11

1

,

1

11

2

,

1

12

2

,

1

22

2

. Answer. Independent.1

f.

[

2

−3

]

,

[

0

−4

]

,

[

−2

2

]

. Answer. Dependent.2

g.

[

−10

]

,

[

2−3

]

. Answer. Independent.3

h.

−200

,

120

,

021

. Answer. Independent.4

i.

−2

000

,

−1

200

,

3

2−7

0

,

−3

254

. Answer. Independent.5

j.

−2

000

,

−1

300

,

4

−2−7

0

,

−3

210

. Answer. Dependent.6

k.

1

111

,

−1

−1−2

3

,

2

201

. Answer. Independent.7

l.

−2

10

,

0

00

,

[

−1

2

]

. Answer. The concept of linear de-8

pendence or independence is defined only for vectors of the same dimension.9

10

2. Suppose that u1 and u2 are linearly independent vectors in R3.11

a. Show that the vectors u1 +u2 and u1−u2 are also linearly independent.12

b. Explain geometrically why this is true.13

3. Suppose that the vectors u1 + u2 and u1 − u2 are linearly dependent.14

Show that the vectors u1 and u2 are also linearly dependent.15

Page 39: Lectures on Linear Algebra Philip Korman

1.5. LINEAR DEPENDENCE AND INDEPENDENCE 39

4. Assume that the vectors u1, u2, u3, u4 in Rn (n ≥ 4) are linearly inde-1

pendent. Show that the same is true for the vectors u1, u1 + u2, u1 + u2 +2

u3, u1 + u2 + u3 + u4.3

5. Given vectors u1, u2, u3 in R3, suppose that the following three pairs4

(u1, u2), (u1, u3) and (u2, u3) are linearly independent. Does it follow that5

the vectors u1, u2, u3 are linearly independent? Explain.6

6. Show that the vectors u1, u2, u1 + u2, u4 in R8 are linearly dependent.7

7. Suppose that the vectors u1, u2, u3 in Rn are linearly dependent. Show8

that the same is true for u1, u2, u3, u4, no matter what the vector u4 ∈ Rn9

is.10

8. Suppose that the vectors u1, u2, u3, u4 in Rn are linearly independent.11

Show that the same is true for u1, u2, u3.12

9. Assume that u1, u2, u3, u4 are vectors in R5 and u2 = 0. Justify that13

these vectors are linearly dependent. (Starting from the definition of linear14

dependence.)15

10∗. The following example serves to illustrate possible pitfalls when doing16

proofs.17

For any positive integer n18

n2 = n + n + · · ·+ n ,

where the sum on the right has n terms. Differentiate both sides with respect19

to the variable n20

2n = 1 + 1 + · · ·+ 1 ,

which gives21

2n = n .

Dividing by n > 0, obtain22

2 = 1 .

Is there anything wrong with this argument? Explain.23

Page 40: Lectures on Linear Algebra Philip Korman

Chapter 21

Matrix Algebra2

2.1 Matrix Operations3

A general matrix of size 2 × 3 can be written as4

[

a11 a12 a13

a21 a22 a23

]

.

Each element has two indices. The first index identifies the row, and the5

second index refers to the column number. All of the elements of the first6

row have the first index 1, while all elements of the third column have7

the second index 3. For example the matrix

[

1 −2 03 1

2 π

]

has a11 = 1,8

a12 = −2, a13 = 0, a21 = 3, a22 = 12 , a23 = π.9

Any matrix can be multiplied by a scalar and any two matrices of the10

same size can be added. Both operations are performed componentwise,11

similarly to vectors. For example,12

a11 a12

a21 a22

a31 a32

+

b11 b12

b21 b22

b31 b32

=

a11 + b11 a12 + b12

a21 + b21 a22 + b22

a31 + b31 a32 + b32

,

13

5

[

a11 a12 a13

a21 a22 a23

]

=

[

5a11 5a12 5a13

5a21 5a22 5a23

]

.

If A is an m × n matrix, given by its columns A = [a1 a2 · · · an], and14

40

Page 41: Lectures on Linear Algebra Philip Korman

2.1. MATRIX OPERATIONS 41

x =

x1

x2...

xn

is a vector in Rn, recall that their product1

A x = x1a1 + x2a2 + · · ·+ xnan

is a vector in Rm. Let B be a n × p matrix, given by its columns B =2

[ b1 b2 · · · bp ]. Each of these columns is a vector in Rn. Define the product3

of two matrices as the following matrix4

A B = [ Ab1 Ab2 · · · Abp ] .

So that the first column of AB is the vector Ab1 in Rm, and so on. Not5

every two matrices can be multiplied. If the size of A is m × n, then the6

size of B must be n × p, with the same n (m and p are arbitrary). The7

size of AB is m× p (one sees from the definition that AB has n rows and p8

columns).9

For example,10

1 −1 1

0 −3 2−4 2 0

2 −1 2

1 −1 2−3 2 −2

=

−2 2 −2

−9 7 −10−6 2 −4

,

because11

1 −1 10 −3 2

−4 2 0

21

−3

= 2

10

−4

+1

−1−3

2

+(−3)

12

0

=

−2−9

−6

,

and the second and third columns of the product matrix are calculated12

similarly.13

If a matrix A has size 2 × 3 and B is of size 3 × 4, their product AB of14

size 2× 4 is defined, while the product BA is not (because the second index15

of the first matrix B does not match the first index of A). For a matrix C16

of size 3 × 4 and a matrix D of size 4 × 3 both products CD and DC are17

defined, but CD has size 3 × 3, while DC is of size 4 × 4. Again, the order18

of the matrices matters.19

Matrices of size n×n are called square matrices of size n. For two square20

matrices of size n, both products AB and BA are defined, both are square21

matrices of size n, but even then22

BA 6= AB ,

Page 42: Lectures on Linear Algebra Philip Korman

42 CHAPTER 2. MATRIX ALGEBRA

in most cases. In a rare case when BA = AB one says that the matrices A1

and B commute.2

Aside from BA 6= AB, the usual rules of algebra apply. For example3

(assuming that all products are defined),4

A (BC) = (AB) C ,5

((AB) C) D = A (BC) D = (AB) (CD) .

It does not matter in which order you multiply, so long as the order in which6

the matrices appear is preserved. Also,7

A (B + C) = AB + AC ,8

2A (−3B) = −6AB .

A square matrix I =

1 0 00 1 0

0 0 1

is called the identity matrix of size9

3 (identity matrices come in all sizes). If A is any square matrix of size 3,10

then one calculates11

IA = AI = A ,

and the same is true for the unit matrix of any size.12

A square matrix D =

2 0 0

0 3 00 0 4

is an example of a diagonal matrix,13

with all off-diagonal entries equal to zero. Let A be any 3× 3 matrix, given14

by its columns A = [a1 a2 a3]. One calculates15

AD = [2a1 3a2 4a3] .

Indeed, the first column of AD is16

A

2

00

= [a1 a2 a3]

2

00

= 2a1 + 0a2 + 0a3 = 2a1 ,

and the other columns of AD are calculated similarly. In particular, if17

A =

p 0 0

0 q 00 0 r

is another diagonal matrix, then18

AD =

p 0 0

0 q 00 0 r

2 0 0

0 3 00 0 4

=

2p 0 0

0 3q 00 0 4r

.

Page 43: Lectures on Linear Algebra Philip Korman

2.1. MATRIX OPERATIONS 43

In general, the product of two diagonal matrices is the diagonal matrix1

obtained by multiplying the corresponding diagonal entries.2

A row vector R =[

2 3 4]

can be viewed as a 1×3 matrix. Similarly,3

the column vector C =

1−2

5

is a matrix of size 3× 1. Their product RC4

is defined, it has size 1 × 1, which is a scalar:5

[

2 3 4]

1−2

5

= 2 · 1 + 3 · (−2) + 4 · 5 = 16 .

We now describe an equivalent alternative way to multiply an m × n6

matrix A and an n × p matrix B. The row i of A is7

Ri = [ai1 ai2 · · · ain] ,

while the column j of B is8

Cj =

b1j

b2j

...bnj

.

To calculate the ij element of the product AB, denoted by (AB)ij , just9

multiply Ri and Cj :10

(AB)ij = ai1b1j + ai2b2j + · · ·+ ainbnj .

For example,11[

1 23 1

][

0 −3−2 2

]

=

[

−4 1−2 −7

]

,

because12

[

1 2]

[

0

−2

]

= 1 · 0 + 2(−2) = −4 ,

13

[

1 2]

[

−32

]

= 1(−3) + 2 · 2 = 1 ,

14

[

3 1]

[

0−2

]

= 3 · 0 + 1(−2) = −2 ,

Page 44: Lectures on Linear Algebra Philip Korman

44 CHAPTER 2. MATRIX ALGEBRA

1

[

3 1]

[

−3

2

]

= 3(−3) + 1 · 2 = −7 .

If A =

[

a11 a12 a13

a21 a22 a23

]

, the transpose of A is defined to be2

AT =

a11 a21

a12 a22

a13 a23

.

To calculate AT , one turns the first row of A into the first column of AT ,3

the second row of A into the second column of AT , and so on. (Observe4

that in the process the columns of A become the rows of AT .) If A is of size5

m × n, then the size of AT is n × m. It is straightforward to verify that6

(

AT)T

= A ,

and7

(AB)T = BT AT ,

provided the matrix product AB is defined.8

A matrix with all entries equal to zero is called the zero matrix, and is9

denoted by O. For example, O =

0 0

0 00 0

is a 3 × 2 zero matrix. If the10

matrices A and O are of the same size, then A + O = O. If the product AO11

is defined, it is equal to the zero matrix.12

Powers of a square matrix A are defined as follows: A2 = AA, A3 = A2A,13

and so on. An is a square matrix of the same size as A.14

Exercises15

1. Determine the 3× 2 matrix X from the relation16

2X +

1 −1

0 23 0

= −3

0 1

−1 00 2

.

2. Determine the 3× 3 matrix X from the relation17

3X + I = O .

Page 45: Lectures on Linear Algebra Philip Korman

2.1. MATRIX OPERATIONS 45

Answer. X =

−13 0 0

0 −13 0

0 0 −13

.1

3. Calculate the products AB and BA, and compare.2

a. A =

1 −1

0 23 0

, B =

[

1 −1 20 2 1

]

.3

Answer. AB =

1 −3 10 4 2

3 −3 6

, BA =

[

7 −3

3 4

]

.4

b. A =[

1 −1 4]

, B =

1

−12

.5

Answer. AB = 10, BA =

1 −1 4−1 1 −4

2 −2 8

.6

c. A =

[

1 −1

3 0

]

, B =

[

−1 2

2 1

]

.7

8

d. A =

[

2 −1

3 1

]

, B =

[

1 −1 2

3 2 1

]

.9

Hint. The product BA is not defined.10

e. A =

1 1 11 1 1

1 1 1

, B =

2 0 00 3 0

0 0 4

.11

f. A =

a 0 0 0

0 b 0 00 0 c 0

0 0 0 d

, B =

2 0 0 0

0 3 0 00 0 4 0

0 0 0 5

.12

Answer. AB = BA =

2a 0 0 0

0 3b 0 00 0 4c 00 0 0 5d

.13

4. Let A and B be square matrices of the same size. Can one assert the14

following formulas? If the answer is no, write down the correct formula.15

Page 46: Lectures on Linear Algebra Philip Korman

46 CHAPTER 2. MATRIX ALGEBRA

a. (A − B)(A + B) = A2 − B2.1

b. (A + B)2 = A2 + 2AB + B2.2

c. (AB)2 = A2B2.3

5. Suppose that the product ABC is defined. Show that the product4

CT BT AT is also defined, and (ABC)T = CT BT AT .5

6. Let A be a square matrix. Show that(

A2)T

=(

AT)2

.6

7. Let A =

[

1 01 0

]

6= O and B =

[

0 00 2

]

6= O. Verify that AB = O.7

8. Let A =

0 1 0

0 0 10 0 0

. Show that A3 = O.8

9. Let H =

3 1 −2

0 −4 11 2 0

.9

a. Calculate HT .10

b. Show that transposition of any square matrix A leaves the diagonal11

entries unchanged, while interchanging the symmetric off diagonal entries12

(aij and aji).13

2.2 The Inverse of a Square Matrix14

An n×n matrix A is said to be invertible if there is an n×n matrix C such15

that16

CA = I , and AC = I ,

where I is an n × n identity matrix. Such matrix C is called the inverse of17

A, and denoted A−1, so that18

A−1A = AA−1 = I .

For example, if A =

[

2 1

3 2

]

, then A−1 =

[

2 −1

−3 2

]

, because19

[

2 13 2

][

2 −1−3 2

]

=

[

2 −1−3 2

] [

2 13 2

]

=

[

1 00 1

]

= I .

Page 47: Lectures on Linear Algebra Philip Korman

2.2. THE INVERSE OF A SQUARE MATRIX 47

Not every square matrix has an inverse. For example, A =

[

0 1

0 0

]

is not1

invertible (no inverse exists). Indeed, if we try any C =

[

c11 c12

c21 c22

]

, then2

AC =

[

0 1

0 0

] [

c11 c12

c21 c22

]

=

[

c21 c22

0 0

]

6=[

1 0

0 1

]

,

for any choice of C. The non-invertible matrix A is also called singular.3

If an n × n matrix A is invertible, then the system4

Ax = b

has a unique solution x = A−1b. Indeed, multiply both sides of this equation5

by A−16

A−1Ax = A−1b ,

and simplify to Ix = A−1b, or x = A−1b. The corresponding homogeneous7

system (when b = 0)8

(2.1) Ax = 0

has a unique solution x = A−10 = 0, the trivial solution. The trivial solution9

is the only solution of (2.1), and that happens when A has n pivots (a pivot10

in every column). Conclusion: if an n × n matrix A is invertible, it has11

n pivots. If A has fewer than n pivots, then A is not invertible (singular).12

Indeed, in such a case A has free variables and then the homogeneous system13

(2.1) has infinitely many solutions, while for invertible A the trivial solution14

is the only one. We now combine these statements.15

Theorem 2.2.1 If an n×n matrix A is invertible (A−1 exists) then A has16

n pivots. If A has fewer than n pivots then A is singular (there is no A−1).17

The converse statements are also true. If A is not invertible it has fewer18

than n pivots (because n pivots imply that A is invertible). And if A has n19

pivots then it is invertible (because we just proved that if A is not invertible20

it has fewer than n pivots).21

Given n vectors in Rn, let us use them as columns of an n × n matrix,22

and call this matrix A. These columns are linearly independent if and only23

if A has n pivots, as we learned previously. We can then restate the above24

theorem.25

Page 48: Lectures on Linear Algebra Philip Korman

48 CHAPTER 2. MATRIX ALGEBRA

Theorem 2.2.2 An n×n matrix is invertible if and only if its columns are1

linearly independent.2

Suppose A is a 3× 3 matrix. If A is invertible, then A has 3 pivots, and3

its columns are linearly independent. If A is not invertible, then the number4

of pivots is either 1 or 2, and the columns of A are linearly dependent.5

Elementary Matrices6

The matrix7

E2(−3) =

1 0 00 −3 0

0 0 1

is obtained by multiplying the second row of I by −3 (or performing −3R28

on the identity matrix I). Calculate the product of this matrix and an9

arbitrary one10

1 0 00 −3 0

0 0 1

a11 a12 a13

a21 a22 a23

a31 a32 a33

=

a11 a12 a13

−3a21 −3a22 −3a23

a31 a32 a33

.

So that multiplying an arbitrary matrix from the left by E2(−3) is the same11

as performing an elementary operation −3R2 on that matrix. Similarly one12

defines an elementary matrix Ei(a) by multiplying the row i of an n × n13

identity matrix I by the number a. If A is an arbitrary n × n matrix, the14

result of the multiplication Ei(a)A is that an elementary operation aRi is15

performed on A.16

The matrix17

E13 =

0 0 10 1 0

1 0 0

is obtained by interchanging the first and the third rows of I (or performing18

R1 ↔ R3 on I). Calculate the product of this matrix and an arbitrary one19

0 0 10 1 01 0 0

a11 a12 a13

a21 a22 a23

a31 a32 a33

=

a31 a32 a33

a21 a22 a23

a11 a12 a13

.

So that multiplying an arbitrary matrix from the left by E13 is the same20

as performing an elementary operation R1 ↔ R3 on that matrix. Similarly21

one defines an elementary matrix Eij by interchanging the row i and the22

Page 49: Lectures on Linear Algebra Philip Korman

2.2. THE INVERSE OF A SQUARE MATRIX 49

row j of an n × n identity matrix I . If A is an arbitrary n × n matrix, the1

result of the multiplication EijA is that an elementary operation Ri ↔ Rj2

is performed on A.3

The matrix4

E13(2) =

1 0 00 1 02 0 1

is obtained from I by adding to the third row the first row multiplied by 25

(or performing R3 +2R1 on I). Calculate the product of this matrix and an6

arbitrary one7

1 0 0

0 1 02 0 1

a11 a12 a13

a21 a22 a23

a31 a32 a33

=

a11 a12 a13

a21 a22 a23

a31 + 2a11 a32 + 2a12 a33 + 2a13

.

So that multiplying an arbitrary matrix from the left by E13(2) is the same8

as performing an elementary operation R3 + 2R1 on that matrix. Similarly9

one defines an elementary matrix Eij(a) by performing Rj + aRi on I . If A10

is an arbitrary n×n matrix, the result of the multiplication Eij(a)A is that11

an elementary operation Rj + aRi is performed on A.12

We summarize. If a matrix A is multiplied from the left by an elementary13

matrix, the result is the same as applying the corresponding elementary14

operation to A.15

Calculating A−116

Given an n × n matrix A, we wish to determine if A is invertible, and if it17

is invertible, calculate the inverse A−1.18

Let us row reduce A by applying elementary operations, which is the19

same as multiplyng from the left by elementary matrices. Denote by E1 the20

first elementary matrix used. (If one has a11 = 1 and a21 = 2, then the first21

elementary operation is R2 − 2R1, so that E1 = E12(−2). If it so happens22

that a11 = 0 and a21 = 1, then the first elementary operation is R1 ↔ R2,23

and then E1 = E12.) The first step of row reduction results in the matrix24

E1A. Denote by E2 the second elementary matrix used. After two steps25

of row reduction we have E2 (E1A) = E2E1A. If A is invertible, it has n26

pivots, and then we can row reduce A to I by complete forward elimination,27

after say p steps. In terms of elementary matrices:28

(2.2) Ep · · ·E2E1 A = I .

Page 50: Lectures on Linear Algebra Philip Korman

50 CHAPTER 2. MATRIX ALGEBRA

This implies that the product Ep · · ·E2E1 is the inverse of A, Ep · · ·E2E1 =1

A−1, or2

(2.3) Ep · · ·E2E1 I = A−1 .

Compare (2.2) with (2.3): the same sequence of elementary operations that3

reduces A to I, turns I into A−1.4

The result is a method for computing A−1. Form a long matrix [ A... I ]5

of size n × 2n. Apply row operations on the entire long matrix, with the6

goal of obtaining I is the first position. Once this is achieved, the matrix in7

the second position is A−1. In short,8

[ A... I ] → [ I

... A−1 ] .

Example 1 Let A =

1 2 −1

2 3 −2−1 −2 0

. Form the matrix [ A... I ]:9

1 2 −1 1 0 02 3 −2 0 1 0

−1 −2 0 0 0 1

.

Perform R2 − 2R1 and R3 + R1 on the entire matrix:10

1 2 −1 1 0 00 −1 0 −2 1 0

0 0 −1 1 0 1

.

Perform −R2 and −R3 on the entire matrix, to make all pivots equal to 1:11

1 2 −1 1 0 00 1 0 2 −1 0

0 0 1 −1 0 −1

.

Perform R1 + R3:12

1 2 0 0 0 −10 1 0 2 −1 0

0 0 1 −1 0 −1

.

Finally, perform R1 − 2R2:13

1 0 0 −4 2 −1

0 1 0 2 −1 00 0 1 −1 0 −1

.

Page 51: Lectures on Linear Algebra Philip Korman

2.2. THE INVERSE OF A SQUARE MATRIX 51

The process is complete, A−1 =

−4 2 −1

2 −1 0−1 0 −1

.1

Example 2 Let B =

−1 2 1

2 −4 −31 −2 1

. Form the matrix [ B... I ]:2

−1 2 1 1 0 02 −4 −3 0 1 0

1 −2 1 0 0 1

.

Perform R2 + 2R1 and R3 + R1 on the entire matrix:3

-1© 2 1 1 0 0

0 0 -1© 2 1 00 0 2 1 0 1

.

Game over! The matrix B does not have a pivot in the second column. So4

that B has fewer than 3 pivots and is therefore singular (there is no inverse),5

by the Theorem 2.2.1.6

For a 2×2 matrix

[

a bc d

]

there is an easier way to calculate the inverse.7

One checks that A−1 =1

ad − bc

[

d −b−c a

]

, provided that ad − bc 6= 0. In8

case ad − bc = 0, the matrix A has no inverse, as will be justified later on.9

The inverses of diagonal matrices are also easy to find. For example, if10

A =

a 0 00 b 0

0 0 c

, with non-zero a, b, c, then A−1 =

1a

0 00 1

b0

0 0 1c

. If one11

of the diagonal entries is zero, then the matrix A is singular.12

Exercises13

1. Write down the 3×3 elementary matrix which corresponds to the follow-14

ing elementary operation: to row 3 add four times the row 2. What is the15

notation used for this matrix?16

Answer. E23(4) =

1 0 0

0 1 00 4 1

.17

Page 52: Lectures on Linear Algebra Philip Korman

52 CHAPTER 2. MATRIX ALGEBRA

2. Write down the 3×3 elementary matrix which corresponds to the follow-1

ing elementary operation: multiply row 3 by −5.2

3. Write down the 4×4 elementary matrix which corresponds to the follow-3

ing elementary operation: interchange the rows 1 and 4.4

Answer. E14 =

0 0 0 1

0 1 0 00 0 1 0

1 0 0 0

.5

4. Explain why the following matrices are singular (not invertible).6

a. A =

[

0 04 1

]

.7

b. A =

[

−3 05 0

]

.8

c. A =

1 0 0

0 −4 00 0 0

.9

Hint. What is the third row of the product of A and any 3 × 3 matrix B?10

5. Find the inverses of the following matrices without performing the Gaus-11

sian elimination.12

a. A =

1 0 00 1 0

0 4 1

. Answer. A−1 =

1 0 00 1 0

0 −4 1

.13

b. A =

1 0 00 −2 0

0 0 13

.14

c. A =

0 0 0 10 1 0 0

0 0 1 01 0 0 0

. Answer. A−1 = A.15

d. A =

[

3 0

0 −2

]

.16

e. A =

14 0 00 −1 0

0 0 5

.17

Page 53: Lectures on Linear Algebra Philip Korman

2.2. THE INVERSE OF A SQUARE MATRIX 53

f. A =

4 0 0

0 0 00 0 5

. Answer. The matrix is singular.1

g. A =

[

1 −13 −2

]

.2

6. Find the inverses of the following matrices by using Gaussian elimination.3

4

a. A =

1 2 00 −1 1

1 −2 1

. Answer. A−1 = 13

1 −2 21 1 −1

1 4 −1

.5

b. A =

[

1 32 6

]

. Answer. The matrix is singular.6

c. A =

0 0 1

0 −1 11 −2 1

. Answer. A−1 =

1 −2 1

1 −1 01 0 0

.7

d. A =

1 2 32 0 23 2 1

. Answer. A−1 = 14

−1 1 11 −2 11 1 −1

.8

e. A =

1 1 20 0 11 0 1

. Answer. A−1 =

0 −1 11 −1 −10 1 0

.9

f. A =

[

1 −13 −2

]

. Answer. A−1 =

[

−2 1−3 1

]

.10

g. A =

1 0 1

1 1 12 1 1

. Answer. A−1 =

0 −1 1

−1 1 01 1 −1

.11

h. B =

1 −1 0

3 −2 00 0 5

. Answer. B−1 =

−2 1 0

−3 1 00 0 1

5

.12

Compare with the preceding example. The matrix B is an example of a13

block diagonal matrix.14

h. C =

1 −1 0 03 −2 0 0

0 0 5 00 0 0 −1

. Answer. C−1 =

−2 1 0 0−3 1 0 0

0 0 15 0

0 0 0 −1

.15

16

Page 54: Lectures on Linear Algebra Philip Korman

54 CHAPTER 2. MATRIX ALGEBRA

The matrix C is another example of a block diagonal matrix.1

7. The third column of a 3 × 3 matrix is equal to the sum of the first two2

columns. Is this matrix invertible? Explain.3

8. Suppose that A and B are non-singular n × n matrices, and (AB)2 =4

A2B2. Show that AB = BA.5

9. Let E13 and E24 be 4 × 4 matrices.6

a. Calculate P = E13E24. Answer. P =

0 0 1 00 0 0 1

1 0 0 00 1 0 0

.7

b. Let A be also 4× 4. Show that PA is obtained from A by interchanging8

row 1 with row 3, and row 2 with row 4.9

c. Show that P 2 = I .10

The matrix P is an example of a permutation matrix.11

10. Show that(

AT)−1

=(

A−1)T

.12

Hint. Take transpose of AA−1 = I .13

11. A square matrix A is called nilpotent if Ak = O, the zero matrix, for14

some positive integer k.15

a. Show that A =

0 1 0 00 0 1 0

0 0 0 10 0 0 0

is nilpotent. Hint. Calculate A4.16

b. If A is nilpotent show that I − A is invertible, and calculate (I − A)−1.17

Answer. (I − A)−1 = I + A + A2 + · · ·+ Ak−1.18

2.3 LU Decomposition19

Examining the definition of inverse matrix (A−1A = AA−1 = I) one sees20

that A plays the role of inverse matrix for A−1, so that A =(

A−1)−1

, or21

(

A−1)−1

= A .

Page 55: Lectures on Linear Algebra Philip Korman

2.3. LU DECOMPOSITION 55

Another property of inverse matrices is1

(cA)−1 =1

cA−1 , for any number c 6= 0 ,

which is true because (cA)

(

1

cA−1

)

= AA−1 = I .2

Given two invertible n × n matrices A and B, we claim that the matrix3

AB is also invertible, and4

(3.1) (AB)−1 = B−1A−1 .

Indeed,5

(

B−1A−1)

(AB) = B−1(

A−1A)

B = B−1IB = B−1B = I ,

and one shows similarly that (AB)(

B−1A−1)

= I . Similar rule holds for6

arbitrary number of invertible matrices. For example7

(ABC)−1 = C−1B−1A−1 .

Indeed, apply (3.1) twice:8

(ABC)−1 = [(AB) C]−1 = C−1 (AB)−1 = C−1B−1A−1 .

We show next that inverses of elementary matrices are also elementary9

matrices, of the same type. We have10

Ei(1

a)Ei(a) = I ,

because the elementary matrix Ei(1

a) performs an elementary operation

1

aRi11

on Ei(a), which results in I . So that12

(3.2) Ei(a)−1 = Ei(1

a) .

For example, E2(−5)−1 = Ei(−1

5), so that in the 3× 3 case13

1 0 0

0 −5 00 0 1

−1

=

1 0 0

0 −15 0

0 0 1

.

Page 56: Lectures on Linear Algebra Philip Korman

56 CHAPTER 2. MATRIX ALGEBRA

Next1

(3.3) E−1ij = Eij ,

(the matrix Eij is its own inverse) because2

EijEij = I .

Indeed, the matrix Eij on the left switches the rows i and j of the other Eij,3

putting the rows back in order to give I . Finally,4

(3.4) Eij(a)−1 = Eij(−a) ,

because5

Eij(−a)Eij(a) = I .

(Indeed, performing Rj−aRi on Eij(a) produces I). For example, E13(4)−1 =6

E13(−4), so that in the 3 × 3 case7

1 0 0

0 1 04 0 1

−1

=

1 0 0

0 1 0−4 0 1

.

8

Some products of elementary matrices can be calculated at a glance. For9

example,10

L = E12(2)E13(−3)E23(4) = E12(2) (E13(−3)E23(4))(3.5)

1 0 0

2 1 00 0 1

1 0 0

2 1 0−3 0 1

1 0 0

0 1 00 4 1

=

1 0 0

2 1 0−3 4 1

.

Indeed, the product of the last two matrices in (3.5)11

E13(−3)E23(4) =

1 0 0

0 1 0−3 0 1

1 0 0

0 1 00 4 1

=

1 0 0

0 1 0−3 4 1

is obtained by applying R3 − 3R1 to E23(4). Applying R2 + 2R1 to the last12

matrix gives L.13

This matrix L is an example of lower triangular matrix, defined as a14

matrix with all elements above the diagonal ones equal to 0 (other elements15

Page 57: Lectures on Linear Algebra Philip Korman

2.3. LU DECOMPOSITION 57

are arbitrary). The matrix L1 =

2 0 0

3 −3 00 −5 0

is another example. All1

elementary matrices of the type Eij(a) are lower triangular. The matrix2

U =

1 −1 1

0 1 00 0 7

is an example of upper triangular matrix, defined as a3

matrix with all elements below the diagonal ones equal to 0.4

Let us perform row reduction on the matrix A =

1 −1 1

2 −1 2−3 7 4

. Per-5

forming R2 − 2R1, R3 + 3R1, followed by R3 − 4R2, produces an upper6

triangular matrix7

(3.6) U =

1 −1 10 1 0

0 0 7

.

Rephrasing in terms of the elementary matrices8

E23(−4)E13(3)E12(−2)A = U .

Multiply both sides from the left by the inverse of the matrix E23(−4)E13(3)E12(−2):9

A = [E23(−4)E13(3)E12(−2)]−1 U = E12(−2)−1E13(3)−1E23(−4)−1U

= E12(2)E13(−3)E23(4)U = LU ,

where L is the lower triangular matrix calculated in (3.5), and the upper10

triangular matrix U is shown in (3.6), so that11

1 −1 12 −1 2

−3 7 4

=

1 0 02 1 0

−3 4 1

1 −1 10 1 0

0 0 7

Similar A = LU decomposition can be calculated for any matrix A,12

for which forward elimination can be performed without switching the rows.13

The upper triangular matrix U is the result of row reduction (the row echelon14

form). The lower triangular matrix L has 1’s on the diagonal, and (L)ji = a15

if the operation Rj − aRi was used in row reduction ((L)ji denotes the ji16

entry of the matrix L). If the operation Rj − aRi was not used in row17

reduction, (L)ji = 0.18

We shall use later the following theorem.19

Page 58: Lectures on Linear Algebra Philip Korman

58 CHAPTER 2. MATRIX ALGEBRA

Theorem 2.3.1 Every invertible matrix A can be written as a product of1

elementary matrices.2

Proof: By the formula (2.2), developed for computation of A−1,3

Ep · · ·E2E1 A = I ,

for some elementary matrices E1, E2, . . . , Ep. Multiply both sides by (Ep · · ·E2E1)−1,4

to obtain5

A = (Ep · · ·E2E1)−1 = E−1

1 E−12 · · ·E−1

p .

The inverses of elementary matrices are themselves elementary matrices. ♦6

7

Exercises8

1. Assuming that A and B are non-singular n × n matrices, simplify:9

a. B (AB)−1 A. Answer. I .10

b. (2A)−1 A2. Answer. 12A.11

c.[

4 (AB)−1 A]−1

. Answer. 14B.12

2. Without using Gaussian elimination find the inverses of the following13

3 × 3 elementary matrices.14

a. E13(2). Answer. E13(−2) =

1 0 00 1 0

−2 0 0

.15

b. E2(5). Answer. E2(15).16

c. E13. Answer. E13 =

0 0 1

0 1 01 0 0

.17

3. Identify the following 4 × 4 matrices as elementary matrices, and find18

their inverses.19

a. A =

1 0 0 0

0 0 0 10 0 1 0

0 1 0 0

. Answer. A = E24, A−1 = E24.20

Page 59: Lectures on Linear Algebra Philip Korman

2.3. LU DECOMPOSITION 59

b. B =

1 0 0 0

0 1 0 00 0 1 0

0 0 −5 1

. Answer. B = E34(−5), B−1 = E34(5).1

c. C =

1 0 0 00 1 0 0

0 0 1 00 0 0 7

. Answer. C = E4(7), C−1 = E4(17 ).2

4. Calculate the products of the following 3 × 3 elementary matrices, by3

performing the multiplication from right to left.4

a. E12(−3)E13(−1)E23(4). Answer.

1 0 0−3 1 0

−1 4 1

.5

b. E12E13(−1)E23(4). Answer.

0 1 01 0 0

−1 4 1

.6

c. E13E13(−1)E23(4). Answer.

−1 4 1

0 1 01 0 0

.7

d. E12(2)E23(−1)E23. Answer.

1 0 0

2 0 10 1 −1

.8

e. E3(3)E13(−1)E12. Answer.

0 1 01 0 0

0 −3 3

.9

5. Find the LU decomposition of the following matrices.10

a.

[

1 2

3 4

]

. Answer. L =

[

1 0

3 1

]

, U =

[

1 2

0 −2

]

.11

b.

1 1 11 2 21 2 3

. Answer. L =

1 0 01 1 01 1 1

, U =

1 1 10 1 10 0 1

.12

c.

1 1 −1

1 2 22 3 5

.13

Page 60: Lectures on Linear Algebra Philip Korman

60 CHAPTER 2. MATRIX ALGEBRA

d.

1 1 1

−1 1 02 2 3

. Answer. L =

1 0 0

−1 1 02 0 1

, U =

1 1 1

0 2 10 0 1

.1

2

e.

1 2 1 00 2 1 −12 4 3 1

0 −2 0 2

.3

Answer. L =

1 0 0 00 1 0 0

2 0 1 00 −1 1 1

, U =

1 2 1 00 2 1 −1

0 0 1 10 0 0 0

.4

6. For the matrix A =

0 1 −1

1 2 22 3 4

the LU decomposition is not possible5

(explain why). Calculate the LU decomposition for the matrix E12A.6

7. Assume that A = E12(3) E3(−2) E23.7

a. Express the inverse matrix A−1 as a product of elementary matrices.8

Answer. A−1 = E23 E3(−12 ) E12(−3).9

b. In case A is 3×3, write down A−1. Answer. A−1 =

1 0 00 0 −1

2−3 1 0

.10

11

8. Suppose that S is invertible and A = S−1BS.12

a. Solve for B in terms of A.13

b. Suppose that A is also invertible. Show that B is invertible, and express14

B−1.15

9. Assume that A, B and A+B are non-singular n×n matrices. Show that16

(

A−1 + B−1)−1

= A (A + B)−1 B .

Hint. Show that the inverses of these matrices are equal.17

10. Show that in general18

(A + B)−1 6= A−1 + B−1 .

Hint. A = 3I , B = 5I provides an easy example (or a counterexample).19

Page 61: Lectures on Linear Algebra Philip Korman

2.4. SUBSPACES, BASES AND DIMENSION 61

2.4 Subspaces, Bases and Dimension1

The space R3 is a vector space, meaning that one can add vectors and2

multiply vectors by scalars. Vectors of the form

1x2

x3

form a subset (a3

part) of R3. Let us call this subset H1. For example, the vectors

1

−23

4

and

13

0

both belong to H1, but their sum

21

3

does not (vectors in5

H1 have the first component 1). Vectors of the form

0

x2

x3

form another6

subset of R3, which we call H2. The sum of any two vectors in H27

0x2

x3

+

0y2

y3

=

0x2 + y2

x3 + y3

belongs to H2, and also8

c

0x2

x3

=

0c x2

c x3

belongs to H2, for any scalar c.9

Definition A subset H of vectors in Rn is called a subspace if for any10

vectors u and v in H and any scalar c11

(i) u + v belongs to H (H is closed under addition)12

(ii) c u belongs to H (H is closed under scalar multiplication).13

So that addition of vectors, and multiplication of vectors by scalars, do14

not take us out of H . A subspace is a vector space itself. One often uses15

the word “space” when talking about a subspace. The set H2 above is a16

subspace, while H1 is not.17

Using c = 0 in part (ii) of the definition, one sees that any subspace18

contains zero vector. Hence, if a set does not contains zero vector, it is not19

Page 62: Lectures on Linear Algebra Philip Korman

62 CHAPTER 2. MATRIX ALGEBRA

a subspace. For example, let H3 be a subset of vectors

x1

x2

x3

x4

of R4, such1

that x1 + x2 + x3 + x4 = 1. H3 is not a subspace, because the zero vector2

00

00

does not belong to H3.3

A special subspace, called zero subspace {0}, consists of only the zero4

vector in Rn. (The space Rn itself also satisfies the above definition, and it5

can be regarded as a subspace of itself.)6

Given vectors v1, v2, . . . , vp in Rn their span, S = Span{v1, v2, . . . , vp},7

is a subspace of Rn. Indeed, suppose x ∈ S and y ∈ S (∈ is a mathematical8

symbol meaning “belongs”). Then x = x1v1+x2v2+· · ·+xpvp and y = y1v1+9

y2v2 + · · ·+ ypvp for some numbers xi and yi. Then x + y = (x1 + y1) v1 +10

(x2 + y2) v2 + · · · + (xp + yp) vp ∈ S, and c x = (cx1)v1 + (cx2)v2 + · · · +11

(cxp)vp ∈ S.12

Definition Given a subspace H we say that the vectors {u1, u2, . . . , uq}13

in H form a basis of H if they are linearly independent and span H (so that14

H = Span{u1, u2, . . . , uq}).15

Theorem 2.4.1 If q vectors U = {u1, u2, . . . , uq} form a basis of H , then16

any q + 1 vectors (or more) in H are linearly dependent.17

Proof: Let {v1, v2, . . . , vr} be some vectors in H , with r > q. We wish18

to show that the equation19

(4.1) x1v1 + x2v2 + · · ·+ xrvr = 0

has a non-trivial solution (not all xi are zero). Express vi’s through the20

basis U :21

v1 = a11u1 + a21u2 + · · ·+ aq1uq

v2 = a12u1 + a22u2 + · · ·+ aq2uq

· · · · · ·vr = a1ru1 + a2ru2 + · · ·+ aqruq ,

Page 63: Lectures on Linear Algebra Philip Korman

2.4. SUBSPACES, BASES AND DIMENSION 63

with some numbers aij , and use them in (4.1). Obtain:1

(a11x1 + a12x2 + · · ·+ a1rxr)u1 + (a21x1 + a22x2 + · · ·+ a2rxr)u2 + · · ·+ (aq1x1 + aq2x2 + · · ·+ aqrxr)uq = 0 .

To satisfy the last equation, it is sufficient to make all of the coefficients2

equal to zero:3

a11x1 + a12x2 + · · ·+ a1rxr = 0

a21x1 + a22x2 + · · ·+ a2rxr = 0

· · · · · ·aq1x1 + aq2x2 + · · ·+ aqrxr = 0 .

We have a homogeneous system with more unknowns than equations. By4

Theorem 1.4.1 it has non-trivial solutions. ♦5

It follows that any two bases of a subspace H have the same number of6

vectors. Indeed, if two bases with the different number of vectors existed,7

then vectors in larger basis would have to be linearly dependent, which is8

not possible by the definition of a basis. The number of vectors in any basis9

is called the dimension of H , denoted by dimH .10

It is intuitively clear that the space R2 is two-dimensional, R3 is three11

dimensional, etc. To justify that R2 is two-dimensional, let us exhibit a12

basis with two elements in R2, by considering the standard basis , consisting13

of e1 =

[

1

0

]

and e2 =

[

0

1

]

. These vectors are linearly independent14

and they span R2, because any vector x =

[

x1

x2

]

∈ R2 can be written15

as x = x1e1 + x2e2. In R3 the standard basis consists of e1 =

1

00

,16

e2 =

01

0

and e3 =

00

1

.17

Theorem 2.4.2 If dimension of a subspace H is n, then any n linearly18

independent vectors of H form a basis.19

Proof: Let u1, u2, . . . , un be any n linearly independent vectors of H .20

We only need to show that they span H . Suppose, on the contrary, that21

Page 64: Lectures on Linear Algebra Philip Korman

64 CHAPTER 2. MATRIX ALGEBRA

we can find a vector w in H which is not in their span. By the Theorem1

1.5.1, the n + 1 vectors u1, u2, . . . , un, w are linearly independent. But that2

contradicts the Theorem 2.4.1. ♦3

It follows that in R2 any two non-collinear vectors form a basis. In R34

any three vectors that do not lie in the same plane form a basis.5

Suppose that vectors B = {b1, b2, . . . , bp} form a basis in some subspace6

H . Then any vector v ∈ H can be represented through the basis elements:7

v = x1b1 + x2b2 + · · ·+ xpbp

with some numbers x1, x2, . . . , xp. This representation is unique, because if8

there is another representation v = y1b1 +y2b2 + · · ·+ypbp, then subtraction9

gives10

0 = (x1 − y1) b1 + (x2 − y2) b2 + · · ·+ (xp − yp) bp ,

and then x1 = y1, x2 = y2, . . . , xp = yp, by the linear independence of vectors11

in the basis B. The coefficients x1, x2, . . . , xp are called the coordinates of v12

with respect to the basis B, with the notation13

[v]B =

x1

x2...

xp

.

Example 1 Two linearly independent vectors b1 =

[

1

−1

]

and b2 =

[

2

0

]

14

form a basis of R2, B = {b1, b2}. The vector v =

[

5

−3

]

can be decomposed15

as v = 3b1 + b2. It follows that [v]B =

[

3

1

]

.16

Example 2 The vectors b1 =

[

1

−1

]

, b2 =

[

2

0

]

and b3 =

[

4

−2

]

do not17

form a basis of R2, because any three vectors in R2 are linearly dependent,18

and in fact, b3 = 2b1 + b2. As in the Example 1, b1 and b2 form a basis of19

R2, B = {b1, b2}, and [b3]B =

[

21

]

.20

Example 3 Verify that the vectors b1 =

1

01

, b2 =

0

−11

, b3 =

1

23

21

Page 65: Lectures on Linear Algebra Philip Korman

2.4. SUBSPACES, BASES AND DIMENSION 65

form a basis of R3, and then find the coordinates of the vector v =

3

34

1

with respect to this basis, B = {b1, b2, b3}.2

To justify that the three vectors b1, b2, b3 form a basis of R3, we only need3

to show that they are linearly independent. That involves showing that the4

matrix A = [ b1 b2 b3 ] has three pivots. Let us go straight to finding the5

coordinates, so that6

v = x1b1 + x2b2 + x3b3 ,

and in the process it will be clear that the matrix A has three pivots. We7

need to solve a 3 × 3 system with the augmented matrix8

[ b1 b2 b3... v ] =

1 0 1 30 −1 2 3

1 1 3 4

.

The matrix of this system is precisely A. Perform R3 − R1, followed by9

R3 + R2. Obtain:10

1© 0 1 3

0 -1© 2 30 0 4© 4

.

The matrix A has three pivots, therefore the vectors b1, b2, b3 are linearly11

independent. Restoring the system, obtain x3 = 1, x2 = −1, x1 = 2, by12

back-substitution. Answer: [v]B =

2

−11

.13

Exercises14

1. Do the following subsets form subspaces of the corresponding spaces?15

a. Vectors in R3 with x1 + x2 ≥ 1.16

Answer. No, the zero vector is not included in this subset.17

b. Vectors in R3 with x21 + x2

2 + x23 ≤ 1.18

Answer. No, the subset is not closed under both addition and multiplication.19

20

c. Vectors in R5 with x1 + x4 = 0.21

Page 66: Lectures on Linear Algebra Philip Korman

66 CHAPTER 2. MATRIX ALGEBRA

Answer. Yes.1

d. Vectors in R4 with x2 = 0.2

Answer. Yes.3

e. Vectors in R2 with x1x2 = 1.4

Answer. No.5

f. Vectors in R2 with x1x2 = 0.6

Answer. No, not closed under addition.7

g. Vectors in R3 with x1 = 2x2 = −3x3.8

Answer. Yes, these vectors lie on a line through the origin.9

h. Vectors in R3 of the form

0

x2

x22

. Does this subset contain the zero10

vector?11

Answer. Not a subspace, even though this subset contains the zero vector.12

2. Show that vectors lying on any line through the origin in R2 form a13

subspace.14

3. a. Show that vectors lying on any line through the origin in R3 form a15

subspace.16

b. Show that vectors lying on any plane through the origin in R3 form a17

subspace.18

4. a. Explain why the vectors b1 =

[

12

]

and b2 =

[

−11

]

form a basis of19

R2, and then find the coordinates of the vector e1 from the standard basis20

with respect to this basis, B = {b1, b2}.21

Answer. [e1]B =

[

1/3−2/3

]

.22

b. What is the vector v ∈ R2 if [v]B =

[

13

]

?23

Answer. v =

[

−25

]

.24

c. For each of the following vectors v1 =

[

21

]

, v2 =

[

02

]

, and v3 =

[

−22

]

25

find their coordinates with respect to this basis, B = {b1, b2}.26

Page 67: Lectures on Linear Algebra Philip Korman

2.4. SUBSPACES, BASES AND DIMENSION 67

Hint. Calculations can be performed simultaneously (in parallel) by consid-1

ering the augmented matrix

[

1 −1 2 0 −2

2 1 1 2 2

]

. Perform R2 − 2R1 on2

the entire matrix, then restore each system.3

Answer. [v1]B =

[

1

−1

]

, [v2]B =

[

2/3

2/3

]

, [v3]B =

[

0

2

]

.4

5. Verify that the vectors b1 =

1

01

, b2 =

0

−11

, b3 =

1

23

form a5

basis of R3, and then find the coordinates of the vectors v1 =

10

4

and6

v2 =

2

15

with respect to this basis, B = {b1, b2, b3}.7

6. a. Show that that the vectors b1 =

12

03

, b2 =

11

11

, b3 =

0−1

1−2

are8

linearly dependent, and express b3 as a linear combination of b1 and b2.9

Answer. b3 = −b1 + b2.10

b. Let V = Span{b1, b2, b3}. Find a basis of V , and dimension of V .11

Answer. B = {b1, b2} is a basis of V . Dimension of V is 2.12

c. Find the coordinates of b1, b2, b3 with respect to the basis in part (b).13

Answer. [b1]B =

[

10

]

, [b2]B =

[

01

]

, [b3]B =

[

−11

]

.14

7. Let E = {e1, e2, e3} be the standard basis in R3, and x =

x1

x2

x3

. Find15

the coordinates [x]E.16

Answer. [x]E =

x1

x2

x3

.17

Page 68: Lectures on Linear Algebra Philip Korman

68 CHAPTER 2. MATRIX ALGEBRA

2.5 Null Spaces and Column Spaces1

We now study two important subspaces associated with any m × n matrix2

A.3

Definition The null space of A is the set of all vectors x ∈ Rn satisfying4

Ax = 0. It is denoted by N (A) (or by NulA).5

Let us justify that the null space is a subspace of Rn. (Recall that the6

terms “subspace” and “space” are used interchangeably.) Assume that the7

vectors x1 and x2 belong to N (A), meaning that Ax1 = 0 and Ax2 = 0.8

Then9

A (x1 + x2) = Ax1 + Ax2 = 0 ,

so that x1 + x2 ∈ N (A). One shows similarly that cx1 ∈ N (A), for any10

number c.11

Finding the null space of A requires solving the homogeneous system12

Ax = 0, which was studied previously. We can now add to that the calcu-13

lation of dimension and basis of N (A).14

Example 1 A =

−1 2 0 1

2 −4 1 −13 −6 1 −2

. The augmented matrix of the15

system Ax = 0 is16

−1 2 0 1 02 −4 1 −1 0

3 −6 1 −2 0

.

Perform R2 + 2R1, R3 + 3R1:17

-1© 2 0 1 00 0 1© 1 0

0 0 1 1 0

.

The second column does not have a pivot, but the third one does. Forward18

elimination is completed by performing R3 − R2:19

-1© 2 0 1 0

0 0 1© 1 00 0 0 0 0

.

Restore the system, take the free variables x2 and x4 to the right, and solve20

for the basis variables x1 and x3. Obtain x1 = 2x2 + x4, x3 = −x4, where21

Page 69: Lectures on Linear Algebra Philip Korman

2.5. NULL SPACES AND COLUMN SPACES 69

x2 and x4 are arbitrary numbers. Putting the answer in the vector form,1

obtain:2

2x2 + x4

x2

−x4

x4

= x2

21

00

+ x4

10

−11

.

So that N (A) is the span of vectors u =

2

100

and v =

1

0−1

1

, N (A) =3

Span{u, v}. Conclusions: the null space N (A) is a subspace of R4 of di-4

mension two, dim N (A) = 2, the vectors u and v form a basis of N (A).5

6

For an arbitrary matrix A the dimension of the null space N (A) is equal7

to the number of free variables in the row echelon form of A.8

If the system Ax = 0 has only the trivial solution, then the null space of9

A is the zero subspace, or N (A) = {0}, the zero vector.10

Definition The column space of a matrix A is the span (the set of all possible11

linear combinations) of its column vectors. It is denoted by C(A) (or ColA).12

In other words, if A = [ a1 a2 · · · an] is an m × n matrix given by its13

columns, the column space consists of all vectors of the form14

(5.1) x1a1 + x2a2 + · · ·+ xnan = Ax ,

so that C(A) is the span of the column vectors, C(A) = Span {a1, a2, . . . , an}15

. Columns of A are vectors in Rm, so that C(A) is a subset of Rm. In fact,16

the column space is a subspace of Rm, because any span is a subspace. The17

formula (5.1) shows that the column space C(A) is the range of the function18

Ax.19

The rank of a matrix A, denoted by rankA, is the dimension of the20

column space of A, rankA = dimC(A).21

Example 2 Determine the basis of the column space of the following22

matrices. Express the columns that are not in the basis through the ones in23

the basis.24

(i) A =

2© 1 3 0 30 -1© 1 1 0

0 0 0 1© 10 0 0 0 0

= [ a1 a2 a3 a4 a5 ],25

Page 70: Lectures on Linear Algebra Philip Korman

70 CHAPTER 2. MATRIX ALGEBRA

where ai’s denote the columns of A. The matrix A is already in row echelon1

form, with the pivots circled. The pivot columns a1, a2, a4 are linearly2

independent. Indeed, the matrix [ a1 a2 a4 ] has three pivots. We show3

next that the other columns, a3 and a5, are linear combinations of the pivot4

columns a1, a2, a4. Indeed, to express a5 through the pivot columns we need5

to find numbers x1, x2, x3 so that6

x1a1 + x2a2 + x3a4 = a5 .

The augmented matrix of this system is7

[ a1 a2 a4... a5 ] =

2© 1 0 3

0 -1© 1 00 0 1© 1

0 0 0 0

.

Back-substitution gives x1 = x2 = x3 = 1, so that8

(5.2) a5 = a1 + a2 + a4 .

To express a3 through the pivot columns we need to find new numbers x1,9

x2, x3 so that10

x1a1 + x2a2 + x3a4 = a3 .

The augmented matrix of this system is11

[ a1 a2 a4... a3 ] =

2© 1 0 3

0 -1© 1 10 0 1© 0

0 0 0 0

.

Back-substitution gives x3 = 0, x2 = −1, x1 = 2, so that12

(5.3) a3 = 2a1 − a2 .

We claim that the pivot columns a1, a2, a4 form a basis of C(A), so that13

dimC(A) = rankA = 3. We already know that these vectors are linearly14

independent, so that it remains to show that they span C(A). The column15

space C(A) consists of vectors in the form v = c1a1+c2a2+c3a3+c4a4+c5a516

Page 71: Lectures on Linear Algebra Philip Korman

2.5. NULL SPACES AND COLUMN SPACES 71

for some numbers c1, c2, c3, c4, c5. Using (5.2) and (5.3), any vector v ∈ C(A)1

can be expressed as2

v = c1a1 + c2a2 + c3 (2a1 − a2) + c4a4 + c5 (a1 + a2 + a4) ,

which is a linear combination of a1, a2, a4.3

(ii) B =

2 1 3 0 3

0 −1 1 1 02 0 4 2 4

−2 −2 −2 1 −3

= [ b1 b2 b3 b4 b5 ],4

where bi’s denote the columns of B.5

Calculation shows that the row echelon form of B is the matrix A from the6

part (i) of Example 2. It turns out that the same conclusions hold for B: b1,7

b2, b4 form a basis of C(B), while b5 = b1+b2+b4 and b3 = 2b1−b2, similarly8

to (5.2) and (5.3). Indeed, to see that b1, b2, b4 are linearly independent, one9

forms the matrix [ b1 b2 b4 ] and row reduces it to the matrix [ a1 a2 a4 ] with10

three pivots. To express b5 through b1, b2, b4, one forms the augmented11

matrix [ b1 b2 b4... b5 ] and row reduces it to the matrix [ a1 a2 a4

... a5 ],12

which leads to b5 = b1 + b2 + b4. Similar reasoning shows that in any matrix13

columns with pivots form a basis of the column space.14

Caution: C(B) is not the same as C(A). Indeed, vectors in C(A) have the15

last component zero, while vectors in C(B) do not.16

We summarize. To obtain a basis for C(B), reduce B to row echelon17

form. Then the columns with pivots (from the original matrix B) form a18

basis for C(B). Other columns are expressed through the pivot ones by19

forming the corresponding augmented matrices. The dimension of C(B), or20

rank B, is equal to the number of pivot columns.21

Recall that the dimension of the null space N (B) is equal to the number22

of columns without pivots (or the number of free variables). The sum of23

the dimensions of the column space and the null space is equal to the total24

number of columns, which for an m × n matrix B reads:25

rank B + dimN (B) = n ,

and is known as the rank theorem.26

Exercises27

Page 72: Lectures on Linear Algebra Philip Korman

72 CHAPTER 2. MATRIX ALGEBRA

1. Find the null space of the given matrix. Identify its basis and dimension.1

2

a.

[

1 23 4

]

. Answer. The zero subspace of R2, of dimension 0.3

b. A =

[

1 −2

3 −6

]

. Answer. N (A) is the span of

[

2

1

]

, dimension = 1.4

5

c. O =

[

0 0

0 0

]

. Answer. N (O) = R2, dimension = 2.6

d.

0 1 −2

4 3 −6−4 −2 4

.7

e. E =

1 −1 −2

2 −2 −43 −3 −6

. Answer. N (E) = Span

2

01

,

1

10

,8

dimension = 2.9

f. F =

1 0 02 −2 0

3 −3 −6

. Answer. N (F ) = {0}, the zero subspace, of10

dimension zero.11

g.

2 1 3 0

2 0 4 1−2 −2 −2 1

.12

h. H =[

−1 1 3 0]

. Hint. The null space is the subspace of R4.13

Answer. N (H) = Span

0

001

,

3

010

,

1

100

, dimension = 314

2. A 4× 5 matrix has two pivots. What is the dimension of its null space?15

3. The rank of a 9× 7 matrix is 3. What is the dimension of its null space?16

What is the number of pivots?17

4. The rank of a 4× 4 matrix is 4.18

a. Describe the null space.19

b. Describe the column space.20

Page 73: Lectures on Linear Algebra Philip Korman

2.5. NULL SPACES AND COLUMN SPACES 73

5. The rank of a 3 × 3 matrix is 2. Explain why its null space is a line1

through the origin, while its column space is a plane through the origin.2

6. Assume that matrix A is of size 3× 5. Explain why dimN (A) ≥ 2.3

7. For a 4 × 4 matrix A the dimension of N (A) is 4. Describe A.4

Answer. A = O.5

8. Find the basis of the column space for the following matrices, and deter-6

mine their rank. Express the columns that are not in the basis through the7

ones in the basis.8

a.

[

−1 1 −1

0 2 4

]

.9

b.

[

−1 1 −11 2 10

]

. Answer. C3 = 4C1 + 3C2, rank = 2.10

c.

[

1 1 2−3 −3 −6

]

. Answer. rank = 1.11

d. A =

−1 2 5−1 2 5

2 0 −2

.12

Answer. C(A) = Span

−1−1

2

,

22

0

, rank = 2, C3 = −C1 + 2C2.13

e. A =

0 0 1

0 2 5−1 0 −3

.14

Answer. C(A) = R3.15

f.

2 1 3 0

2 0 4 1−2 −1 −3 1

.16

Column space is spanned by C1, C2 and C4. Rank is 3. C3 = 2C1 − C2.17

g. B =

1 −1 0 1 12 −1 1 1 −3

0 1 1 −1 −5

.18

Answer. C(B) = Span

1

20

,

−1

−11

, rank = 2, C3 = C1 + C2, C4 =19

−C2, C5 = −4C1 − 5C2.20

Page 74: Lectures on Linear Algebra Philip Korman

74 CHAPTER 2. MATRIX ALGEBRA

9. Let A be an m × n matrix with linearly independent columns.1

a. Show that the system Ax = b has at most one solution for any vector b.2

Hint. If C1, C2, . . . , Cn are the columns of A, and x1, x2, . . . , xn are the3

components of x, then x1C1 + x2C2 + . . . + xnCn = b.4

b. Suppose that b ∈ C(A). Show that the system Ax = b has exactly one5

solution.6

Page 75: Lectures on Linear Algebra Philip Korman

Chapter 31

Determinants2

3.1 Cofactor Expansion3

To each square matrix A one associates a number called determinant of A,4

and denoted by either detA or |A|. For 2 × 2 matrices5

a b

c d

= ad − bc .

For 3 × 3 matrices the formula is6

a11 a12 a13

a21 a22 a23

a31 a32 a33

= a11a22a33 + a12a23a31 + a13a21a32 − a11a23a32(1.1)

−a12a21a33 − a13a22a31 .

It seems impossible to memorize this formula, but we shall learn how to7

produce it.8

For an n × n matrix A define the minor Mij as an (n − 1) × (n − 1)9

determinant obtained by removing the row i and the column j in A. For10

example, for the matrix11

A =

1 0 −3

−1 6 23 2 1

,

M11 =

6 22 1

= 2, M12 =

−1 23 1

= −7, M13 =

−1 63 2

= −20.12

Define also the cofactor13

Cij = (−1)i+jMij .

75

Page 76: Lectures on Linear Algebra Philip Korman

76 CHAPTER 3. DETERMINANTS

For the above matrix, C11 = (−1)1+1M11 = 2, C12 = (−1)1+2M12 = 7,1

C13 = (−1)1+3M13 = −20.2

Cofactor expansion will allow us to define 3 × 3 determinants through3

2 × 2 ones, then 4 × 4 determinants through 3 × 3 ones, and so on. For an4

n × n matrix the cofactor expansion in row i is5

|A| = ai1Ci1 + ai2Ci2 + · · ·+ ainCin .

The cofactor expansion in column j is6

|A| = a1jC1j + a2jC2j + · · ·+ anjCnj .

For 3× 3 determinants there are 6 cofactor expansions, but all of them lead7

to the same formula (1.1). Similarly, for n × n determinants all cofactor8

expansions lead to the same number, |A|. For the above matrix, cofactor9

expansion in the first row gives10

|A| = 1 · C11 + 0 · C12 + (−3) ·C13 = 62 .

In practice one does not calculate (−1)i+j, but uses the checker-board pat-11

tern12

+ − +

− + −+ − +

to get the right signs of the cofactors (and similarly for larger matrices). Let13

us expand the same determinant in the second row:14

1 0 −3−1 6 2

3 2 1

= −(−1)

0 −3

2 1

+ 6

1 −3

3 1

− 2

1 0

3 2

= 62 .

One tries to pick a row (or column) with many zeroes to perform a15

cofactor expansion. Indeed, if aij = 0 there is no need to calculate Cij ,16

because aijCij = 0 anyway.17

Example Expanding in the first column18

2 0 3 −40 3 8 1

0 0 4 −20 0 0 5

= 2 ·

3 8 1

0 4 −20 0 5

= 2 · 3 ·∣

4 −2

0 5

= 2 · 3 · 4 · 5 = 120 .

Page 77: Lectures on Linear Algebra Philip Korman

3.1. COFACTOR EXPANSION 77

(The 3 × 3 determinant on the second step was also expanded in the first1

column.)2

The matrix in the last example was upper triangular. Similar reasoning3

shows that the determinant of any upper triangular matrix equals to the4

product of the diagonal entries. For a lower triangular matrix, like5

2 0 0 012 −3 0 0

2 13 4 0

−1 2 7 0

= 2 · (−3) · 4 · 0 = 0 ,

the expansion was performed in the first row on each step. In general, the6

determinant of any lower triangular matrix equals to the product of the diag-7

onal entries. Diagonal matrices can be viewed as either upper triangular or8

lower triangular. Therefore, the determinant of any diagonal matrix equals9

to the product of the diagonal entries. For example, if I is an n× n identity10

matrix, then11

| − 2I | = (−2) · (−2) · · · · · (−2) = (−2)n .

Cofactor expansions are not practical for computing n×n determinants12

if n ≥ 5. Let us count the number of multiplications it takes. For a 2 × 213

matrix it takes 2 multiplications. For a 3 × 3 matrix one needs to calcu-14

late three 2 × 2 determinants which takes 3 · 2 = 3! multiplications, plus15

3 more multiplications in the cofactor expansion, for a total of 3! + 3. For16

an n × n matrix it takes n! + n multiplications. If n = 20, this number17

is 2432902008176640020, and computations would take many thousands of18

years on the fastest computers. An efficient way for computing determinants19

is developed in the next section.20

Exercises21

1. Find x so that

x 3−1 2

=

0 x1 5

. Answer. x = −1.22

2. Let A =

1 1 −1

−1 1 20 2 3

. Calculate the det A23

a. By expanding in the second row.24

Page 78: Lectures on Linear Algebra Philip Korman

78 CHAPTER 3. DETERMINANTS

b. By expanding in the second column.1

c. By expanding in the third row.2

Answer. |A| = 4.3

3. Calculate the determinants of the following matrices.4

a.

1 0 0

0 2 00 0 3

. Answer. 3!5

b.

1 0 0 0

0 −2 0 00 0 −3 0

0 0 0 −4

. Answer. −4!6

c. Any diagonal matrix.7

d.

[

1 0

−5 2

]

.8

e.

1 0 0−5 2 0

6 12 3

. Answer. 6.9

f. Any lower triangular matrix.10

g. Any upper triangular matrix.11

h.

0 0 a

0 b 5c −2 3

.12

i.

1 −1 0 3

0 2 −2 1−1 −2 0 2

1 1 1 2

. Answer. −27.13

j.

2 0 0 00 a b 0

0 c d 00 0 0 3

. (A block diagonal matrix.)14

Answer. 2 ·∣

a b

c d

· 3 = 6 (ad − bc).15

Page 79: Lectures on Linear Algebra Philip Korman

3.1. COFACTOR EXPANSION 79

k.

a b 0 0

c d 0 00 0 e f

0 0 g h

. (A block diagonal matrix.)1

Answer.

a b

c d

·∣

e f

g h

= (ad − bc) (eh − fg).2

l.

2 −1 0 5

4 −2 0 −31 3 0 1

0 −7 0 8

. Answer. 0.3

m. A matrix with a row of zeroes. Answer. The determinant is 0.4

3. Calculate |A2| and relate it to |A| for the following matrices.5

a. A =

[

2 −40 3

]

.6

b. A =

[

1 −11 1

]

.7

4. Let A =

0 0 . . . 0 10 1 . . . 0 0...

.... . .

......

0 0 . . . 1 0

1 0 . . . 0 0

, an n×n matrix. Show that |A| = −1.8

Hint. Expand in the first row, then expand in the last row.9

5. Calculate the n × n determinant Dn =

2 1 0 . . . 0 01 2 1 . . . 0 0

0 1 2 . . . 0 0...

......

. . ....

...0 0 0 . . . 2 1

0 0 0 . . . 1 2

.10

Hint. Expanding in the first row, obtain the recurrence relation Dn =11

2Dn−1 − Dn−2. Beginning with D2 = 3 and D3 = 4, use this recurrence12

relation to calculate D4 = 5 and D5 = 6, and so on. Answer. Dn = n+1.13

14

6. Let A be a 5 × 5 matrix, with aij = (i − 3)j. Show that |A| = 0.15

Hint. What is the third row of A?16

Page 80: Lectures on Linear Algebra Philip Korman

80 CHAPTER 3. DETERMINANTS

7. Suppose that a square matrix has integer entries. Show that its deter-1

minant is an integer. Prove that the converse statement is not true, by2

considering for example

32

12

52 −1

2

.3

3.2 Properties of Determinants4

An n × n matrix A can be listed by its rows A =

R1

R2...

Rn

, which are n-5

dimensional row vectors. Let us highlight Ri (the row i) in A:6

A =

a11 a12 . . . a1n

......

...

ai1 ai2 . . . ain

......

...an1 an2 . . . ann

.

Using the summation notation, the cofactor expansion in the row i takes7

the form8

|A| = ai1Ci1 + ai2Ci2 + · · ·+ ainCin =

n∑

s=1

aisCis .

The first three properties deal with the elementary row operations.9

Property 1. If one row of A is multiplied by k to produce B, then det B =10

k detA.11

Indeed, assume row i is multiplied by k. We need to show that12

|B| =

R1...

kRi

...

Rn

= k

R1...

Ri

...

Rn

= k|A| .

Expand |B| in row i, and use the summation notation:13

|B| =

n∑

s=1

(kais)Cis = k

n∑

s=1

aisCis = k|A| .

Page 81: Lectures on Linear Algebra Philip Korman

3.2. PROPERTIES OF DETERMINANTS 81

(In row i cofactors are the same for B and A, since row i is removed when1

calculating cofactors.)2

If B = kA, then all n rows of A are multiplied by k to produce B. It3

follows that det B = kn det A, or4

|kA| = kn|A| .

Property 2. If two rows of A are interchanged to produce B, then det B =5

− det A.6

Indeed, for 2 × 2 matrices this property is immediately verified. Suppose7

that A is a 3 × 3 matrix, A =

R1

R2

R3

and B =

R3

R2

R1

is obtained from8

A by switching rows 1 and 3. Expand both |B| and |A| in the second row.9

In the expansion of |B| one will encounter 2× 2 determinants with the rows10

switched, compared with the expansion of |A|, giving |B| = −|A|. Then one11

justifies this property for 4 × 4 marices, and so on.12

It follows that if a matrix has two identical rows, its determinant is zero.13

Indeed, interchange the identical rows, to get a matrix B. By Property 2,14

|B| = −|A|. On the other hand B = A, so that |B| = |A|. It follows that15

|A| = −|A|, giving |A| = 0. If two rows are proportional the determinant is16

again zero. For example,17

R1

kR1

R3

= k

R1

R1

R3

= 0 .

Assume that row j in A is replaced by Ri, so that Rj = Ri. One has18

R1...

Ri

...

Ri

...Rn

= 0 .

Let us expand this determinant in j-th row:19

ai1Cj1 + ai2Cj2 + · · ·+ ainCjn = 0 .

Page 82: Lectures on Linear Algebra Philip Korman

82 CHAPTER 3. DETERMINANTS

(Once row j is removed, the cofactors are the same as in the matrix A.)1

Comparing that with the cofactor expansion of |A| in row i:2

ai1Ci1 + ai2Ci2 + · · ·+ ainCin = |A| ,

we conclude the following theorem.3

Theorem 3.2.1 If elements of row i are multiplied by the cofactors of an-4

other row j and added, the result is zero. If elements of row i are multiplied5

by their own cofactors and added, the result is |A|. In short,6

n∑

s=1

aisCjs =

{

0 if j 6= i

|A| if j = i .

Property 3. If a multiple of one row of A is added to another row to produce7

a matrix B, then det B = det A. (In other words, elementary operations of8

type Rj + kRi leave the value of the determinant unchanged.)9

Indeed, assume B was obtained from A by using Rj + kRi. Expand |B|10

in row j, use the summation convention and the preceeding Theorem 3.2.1:11

|B| =

R1...

Rj + kRi

...Rn

=

n∑

s=1

(ajs + kais)Cjs =

n∑

s=1

ajsCjs + k

n∑

s=1

aisCjs = |A| .

Using the Properties 1,2,3 one row reduces any determinant to that of12

upper triangular matrix (which is a product if its diagonal entries). This13

method (based on Gaussian elimination) is very efficient, allowing compu-14

tation of 20 × 20 determinants on the basic laptops. (Entering a 20 × 2015

determinant is likely to take longer than its computation.)16

Example For the next determinant we perform R1 ↔ R2, and then take17

2 out of the (new) first row:18

0 1 2 32 −2 0 −6

1 1 0 12 −2 4 4

= −

2 −2 0 −60 1 2 3

1 1 0 12 −2 4 4

= −2

1 −1 0 −30 1 2 3

1 1 0 12 −2 4 4

.

Page 83: Lectures on Linear Algebra Philip Korman

3.2. PROPERTIES OF DETERMINANTS 83

Performing R3 − R1, R4 − 2R1 for the resulting determinant, followed by1

R3 − 2R2, and finally R4 + R3, gives:2

1 −1 0 −30 1 2 3

1 1 0 12 −2 4 4

=

1 −1 0 −30 1 2 3

0 2 0 40 0 4 10

=

1 −1 0 −30 1 2 3

0 0 −4 −20 0 4 10

3

=

1 −1 0 −30 1 2 3

0 0 −4 −20 0 0 8

= 1 · 1 · (−4) · 8 = −32 .

The original determinant is then (−2) · (−32) = 64.4

In practice one combines row reduction with cofactor expansion. For5

example, after performing R2 + R1 and R3 − R1,6

1 0 2−1 1 −1

1 1 5

=

1 0 20 1 1

0 1 3

= 1 ·∣

1 11 3

= 2 ,

the determinant is computed by expanding in the first column.7

If Gaussian elimination for A did not involve row exchanges, |A| is equal8

to the product of the diagonal entries in the resulting upper triangular ma-9

trix, otherwise |A| is ± the product of the diagonal entries in the row echelon10

form. It follows that |A| 6= 0 is equivalent to all of the diagonal entries being11

non-zero, so that A has n pivots, which is in turn equivalent to A being12

invertible. We conclude that A is invertible if and only if |A| 6= 0.13

Determinants of elementary matrices are easy to calculate. Indeed,14

|Ei(k)| = k (diagonal matrix), |Eij| = −1 (Property 2), and |Eij(k)| = 115

(lower triangular matrix). We can then restate Property 1 as16

|Ei(k)A| = k|A| = |Ei(k)||A| ,

Property 2 as17

|EijA| = −|A| = |Eij||A| ,and Property 3 as18

|Eij(k)A| = |A| = |Eij(k)||A| .Summarize:19

(2.1) |EA| = |E||A| ,

Page 84: Lectures on Linear Algebra Philip Korman

84 CHAPTER 3. DETERMINANTS

where E is an elementary matrix of any kind.1

Property 4. For any two n × n matrices2

(2.2) |AB| = |A||B| .

Proof: Case (i) |A| = 0. Then A is not invertible. We claim that AB3

is also not invertible. Indeed, if the inverse (AB)−1 existed, we would have4

AB(AB)−1 = I , which means that B(AB)−1 is the inverse of A, but A has5

no inverse. Since AB is not invertible, |AB| = 0, and (2.2) holds.6

Case (ii) |A| 6= 0. By the Theorem 2.3.1 a non-singular matrix A can be7

written as a product of elementary matrices (of various kinds)8

A = E1E2 · · ·Ep .

Applying (2.2) to product of two matrices at a time9

|A| = |E1| |E2 · · ·Ep| = |E1| |E2| · · · |Ep| .

Similarly10

|AB| = |E1E2 · · ·EpB| = |E1| |E2 · · ·Ep B| = |E1| |E2| · · · |Ep| |B| = |A| |B| ,

concluding the proof. ♦11

Recall that powers of a square matrix A are defined as follows: A2 = AA,12

A3 = A2A, etc. Then |A2| = |A| |A| = |A|2, and in general13

|Ak| = |A|k , for any positive integer k .

Property 5. If A is invertible, then |A| 6= 0, and14

|A−1| =1

|A| .

Indeed,15

|AA−1| = |I | = 1 ,16

|A||A−1| = 1 ,

by Property 4. Then |A| 6= 0, and |A−1| =1

|A| .17

We conclude that in case |A| = 0, the matrix A is not invertible (A−118

does not exist).19

Page 85: Lectures on Linear Algebra Philip Korman

3.2. PROPERTIES OF DETERMINANTS 85

Property 6. |AT | = |A|.1

Indeed, AT has the rows and columns of A interchanged, while cofactor2

expansion works equally well for rows and columns.3

The last property implies that all of the facts stated above for rows are4

also true for columns. For example, if two columns of A are proportional,5

then |A| = 0. If a multiple of column i is subtracted from column j, the6

determinant remains unchanged.7

Exercises8

1. Calculate the following determinants by combining row reduction and9

cofactor expansion.10

a.

1 2 03 −1 1

1 −2 1

.11

b.

0 −2 3

3 −1 11 −1 1

. Hint. Perform R1 ↔ R3.12

c.

0 −2 3 1−1 −1 1 0

2 −1 −1 2

1 −4 3 3

. Answer. 0.13

d.

1 0 −1 1

1 1 2 −10 1 2 3

2 1 −2 3

. Answer. 12.14

e.

1 1 −1 1

1 1 2 −1−1 −1 2 3

2 1 −2 3

. Answer. −14.15

f.

1 1 −1 11 2 2 −1

−1 −2 2 32 1 −2 3

. Answer. −10.16

Page 86: Lectures on Linear Algebra Philip Korman

86 CHAPTER 3. DETERMINANTS

g∗.

1 1 1

a b ca2 b2 c2

. (Vandermonde determinant.)1

Answer. (b − a)(c − a)(c− b).2

2. Assuming that

a b cd e f

g h k

= 5, find the following determinants.3

a.

a b c

d + 3a e + 3b f + 3cg h k

. Answer. 5.4

b.

a b c

2d 2e 2fg h k

. Answer. 10.5

c.

3a 3b 3c2d 2e 2f

g h k

. Answer. 30.6

d.

a b c2d + 3a 2e + 3b 2f + 3c

g h k

.7

e.

d e f

a b cg h k

.8

f.

d e f

g h ka b c

. Answer. 5.9

g.

a b −cd e −f

g h −k

. Answer. −5.10

h.

a b 0d e 0

g h 0

.11

3. a. If every column of A adds to zero, show that |A| = 0.12

b. If every row of A adds to zero, what is |A|?13

Page 87: Lectures on Linear Algebra Philip Korman

3.2. PROPERTIES OF DETERMINANTS 87

4. Let A and B be 4× 4 matrices, such that |A| = 3, and |B| = 12 . Find the1

following determinants.2

a. |AT |.3

b. |2A|. Answer. 48.4

c. |B2|.5

d. |BA|.6

e. |A−1B|. Answer. 16 .7

f. |2AB−1| Answer. 96.8

g. |A2(−B)T |. Answer. 92 .9

5. Let A be a 7 × 7 matrix such that | − A| = |A|. Show that |A| = 0.10

6. True or false?11

a. |BA| = |AB|.12

b. | − A| = |A|. Answer. False.13

c. If A3 is invertible, then |A| 6= 0. Answer. True.14

d. |A + B| = |A|+ |B|.15

e. |(A2)−1| = |(A−1)2| = 1|A|2 , provided that |A| 6= 0. Answer. True.16

7. Show that17∣

1 1 1

x a cy b d

= 0

is an equation of the straight line through the points (a, b) and (c, d) in the18

xy-plane.19

Hint. The graph of a linear equation is a straight line.20

8. Show that21∣

1 1 1 1x a1 b1 c1

y a2 b2 c2

z a3 b3 c3

= 0

is an equation of the plane passing through the points (a1, a2, a3), (b1, b2, b3)22

and (c1, c2, c3).23

Hint. Expanding in the first column, obtain a linear equation in x, y and z.24

25

Page 88: Lectures on Linear Algebra Philip Korman

88 CHAPTER 3. DETERMINANTS

9. Let A =

1 2 0

0 −1 11 −2 1

and B =

1 −2 1

2 −4 21 −3 1

. Calculate det(

A3B)

.1

Hint. What is detB?2

10. Calculate the n × n determinant

1 1 1 . . . 1 1

2 3 2 . . . 2 22 2 4 . . . 2 2...

......

. . ....

...2 2 2 . . . n 2

2 2 2 . . . 2 n + 1

.3

Hint. Apply R2 − 2R1, R3 − 2R1, and so on. Answer. (n − 1)!.4

11. Let A be an n × n matrix, and the matrix B is obtained by writing the5

rows of A in the reverse order. Show that |B| = (−1)n(n−1)

2 |A|.6

Hint. 1 + 2 + 3 + · · ·+ n − 1 =n(n−1)

2 .7

12. Let A be an n × n skew-symmetric matrix, defined by the relation8

AT = −A.9

a. Show that aij = −aji.10

b. Show that all diagonal entries are zero.11

c. Let n be odd. Show that |A| = 0.12

13. Let A be an n × n matrix, with aij = min(i, j).13

a. If n = 4, show that A =

1 1 1 11 2 2 2

1 2 3 31 2 3 4

, and find its determinant.14

b. Show that |A| = 1 for any n.15

Hint. From the column n subtract the column n− 1, then from the column16

n − 1 subtract the column n − 2, and so on.17

14. Let n be odd. Show that there is no n × n matrix A with real entries,18

such that A2 = −I .19

Page 89: Lectures on Linear Algebra Philip Korman

3.3. CRAMER’S RULE 89

3.3 Cramer’s Rule1

Let2

(3.1) A =

a11 a12 . . . a1n

a21 a22 . . . a2n

......

...an1 an2 . . . ann

be an n × n matrix, with |A| 6= 0. Form the adjugate matrix3

AdjA =

C11 C21 . . . Cn1

C12 C22 . . . Cn2...

......

C1n C2n . . . Cnn

consisting of cofactors of A, in transposed order. Theorem 3.2.1 implies that4

A Adj A =

|A| 0 . . . 0

0 |A| . . . 0...

......

0 0 . . . |A|

= |A|I ,

where I is the n × n identity matrix. Indeed the diagonal elements of the5

product matrix are computed by multiplying elements of rows of A by their6

own cofactors and adding (which gives |A|), while the off-diagonal elements7

of the product matrix are computed by multiplying rows of A by cofactors of8

other rows and adding (which gives 0). It follows that A

(

1

|A| AdjA

)

= I ,9

producing a formula for an inverse matrix10

(3.2) A−1 =1

|A| Adj A =1

|A|

C11 C21 . . . Cn1

C12 C22 . . . Cn2...

......

C1n C2n . . . Cnn

.

Example 1 A =

[

a bc d

]

. Then |A| = ad − bc, C11 = d, C12 = −c,11

C21 = −b, C22 = a, giving12

A−1 =1

ad − bc

[

d −b−c a

]

,

Page 90: Lectures on Linear Algebra Philip Korman

90 CHAPTER 3. DETERMINANTS

provided that ad − bc 6= 0. What happens if |A| = ad − bc = 0 ? Then1

A has no inverse, as a consequence of the following theorem, proved in the2

preceding section.3

Theorem 3.3.1 An n × n matrix A is invertible if and only if |A| 6= 0.4

Example 2 Find the inverse of A =

1 1 00 0 −1

1 2 0

.5

Calculate |A| = 1, C11 =

[

0 −12 0

]

= 2, C12 = −[

0 −11 0

]

= −1,6

C13 =

[

0 0

1 2

]

= 0, C21 = −[

1 0

2 0

]

= 0, C22 =

[

1 0

1 0

]

= 0, C23 =7

−[

1 1

1 2

]

= −1, C31 =

[

1 0

0 −1

]

= −1, C32 = −[

1 0

0 −1

]

= 1, C33 =8

[

1 1

0 0

]

= 0. Obtain:9

A−1 =

C11 C21 C31

C12 C22 C32

C13 C23 C33

=

2 0 −1−1 0 1

0 −1 0

.

10

We now turn to an n × n system Ax = b, with the matrix11

A =

a11 a12 . . . a1n

a21 a22 . . . a2n

......

...an1 an2 . . . ann

, the vector of right hand sides b =

b1

b2...bn

,

the vector of unknowns x =

x1

x2...

xn

, or in components12

a11x1 + a12x2 + · · ·+ a1nxn = b1(3.3)

a21x1 + a22x2 + · · ·+ a2nxn = b2

· · · · · ·an1x1 + an2x2 + · · ·+ annxn = bn .

Page 91: Lectures on Linear Algebra Philip Korman

3.3. CRAMER’S RULE 91

Define the matrix1

A1 =

b1 a12 . . . a1n

b2 a22 . . . a2n

......

...bn an2 . . . ann

,

obtained by replacing the first column of A by the vector of the right hand2

sides. Similarly, define3

A2 =

a11 b1 . . . a1n

a21 b2 . . . a2n

......

...

an1 bn . . . ann

, . . . , An =

a11 a12 . . . b1

a21 a22 . . . b2...

......

an1 an2 . . . bn

.

By expanding in the first column, calculate4

(3.4) |A1| = b1C11 + b2C21 + · · ·+ bnCn1 ,

where Cij are cofactors of the original matrix A. One shows similarly that5

|Ai| = b1C1i + b2C2i + · · ·+ bnCni ,

for all i.6

Theorem 3.3.2 (Cramer’s rule) Assume that |A| 6= 0. Then the unique7

solution of the system (3.3) is given by8

x1 =|A1||A| , x2 =

|A2||A| , . . . , xn =

|An||A| .

Proof: By the preceding theorem 3.3.1, A−1 exists. Then the unique9

solution of the system (3.3) is x = A−1b. Using the expression of A−1 from10

(3.2)11

x =

x1

x2...

xn

=1

|A|

C11 C21 . . . Cn1

C12 C22 . . . Cn2...

......

C1n C2n . . . Cnn

b1

b2...bn

.

Now compare the components, and use (3.4)12

x1 =1

|A| (b1C11 + b2C21 + · · ·+ bnCn1) =|A1||A| .

Page 92: Lectures on Linear Algebra Philip Korman

92 CHAPTER 3. DETERMINANTS

One shows similarly that xi = |Ai||A| for all i. ♦1

Example 3 Solve the system2

2x− y = 3

−x + 5y = 4 .

Solution: x =

3 −1

4 5

2 −1−1 5

=19

9, y =

2 3

−1 4

2 −1−1 5

=11

9.3

For an n × n homogeneous system4

(3.5) Ax = 0

we shall use the following theorem, which is just a logical consequence of5

Theorem 3.3.1.6

Theorem 3.3.3 The system (3.5) has non-trivial solutions if and only if7

|A| = 0.8

Proof: Assume that non-trivial solutions exist. We claim that |A| = 0.9

Indeed, if |A| 6= 0, then by Theorem 3.3.1 A−1 exists, but then (3.5) has only10

the trivial solution (x = A−10 = 0), a contradiction. Conversely, assume11

that |A| = 0. Then by Theorem 3.3.1, the matrix A is not invertible, hence12

the system (3.5) has free variables, resulting in non-trivial solutions. ♦13

3.3.1 Vector Product14

In Calculus a common notation for the coordinate vectors in R3 is i = e1, j =15

e2 and k = e3. Given two vectors a = a1i+a2j+a3k and b = b1i+b2j+b3k16

the vector product of a and b is defined to be the vector17

(3.1) a × b = (a2b3 − a3b2) i + (a3b1 − a1b3) j + (a1b2 − a2b1)k .

Perhaps it is not easy to memorize this formula, but determinants come to18

the rescue:19

a × b =

i j k

a1 a2 a3

b1 b2 b3

.

Page 93: Lectures on Linear Algebra Philip Korman

3.3. CRAMER’S RULE 93

Indeed, expanding this determinant in he first row gives the formula (3.1).1

By the properties of determinants it follows that for any vector a2

a× a =

i j k

a1 a2 a3

a1 a2 a3

= 0 ,

where 0 is the zero vector, and similarly3

a × b = −b × a ,

for any vectors a and b. If c = c1i + c2j + c3k, then the triple product is4

defined as5

a·(b× c) = a1 (b2c3 − b3c2)+a2 (b3c1 − b1c3)+a3 (b1c2 − b2c1) =

a1 a2 a3

b1 b2 c3

c1 c2 c3

.

If V is the volume of the parallelepiped determined by the vectors a, b, and6

c, it is known from Calculus7

V = |a · (b× c) | .

Since |AT | = |A|, it follows that the absolute value of the determinant8

a1 b1 c1

a2 b2 c2

a3 b3 c3

also gives the volume of the parallelepiped determined by the vectors a, b,9

and c.10

There are a number of useful vector identities involving vector a scalar11

products. For example,12

a × (b× c) = b (a · c) − c (a · b) ,

which is memorized as a “bac minus cab” identity. The proof involves a13

straighforward calculation of both sides in components.14

Exercises15

Page 94: Lectures on Linear Algebra Philip Korman

94 CHAPTER 3. DETERMINANTS

1. Use the adjugate matrix to calculate the inverse for the following matrices.1

2

a.

[

1 2

1 1

]

.3

b.

[

1 −2−2 4

]

. Answer. The matrix is singular.4

c.

1 2 00 −1 1

1 −2 1

. Answer. 13

1 −2 21 1 −1

1 4 −1

.5

d.

0 −1 01 0 0

0 0 5

. Answer.

0 1 0−1 0 0

0 0 15

.6

e.

1 2 34 5 6

7 8 9

. Answer. The matrix is singular.7

f.

1 0 00 −5 0

0 0 9

.8

g.

1 1 1 01 0 0 −1

−1 0 0 00 0 1 0

. Answer.

0 0 −1 01 0 1 −1

0 0 0 10 −1 −1 0

.9

h.

1 1 1 01 1 0 1

1 0 1 10 1 1 1

. Answer. 13

1 1 1 −21 1 −2 1

1 −2 1 1−2 1 1 1

.10

2. Use Cramer’s rule to solve the following systems. In case Cramer’s rule11

does not work, apply Gaussian elimination.12

a.13 x1 − x2 = 2

2x1 + x2 = −3 .

14

b.15 5x1 − x2 = 0

2x1 + x2 = 0 .

16

c.17

Page 95: Lectures on Linear Algebra Philip Korman

3.3. CRAMER’S RULE 95

4x1 − 2x2 = 5

−2x1 + x2 = −1 .

Answer. The system is inconsistent.1

d.2 2x1 − x2 = 1

−2x1 + x2 = −1 .

Answer. x1 = 12t + 1

2 , x2 = t, t is arbitrary.3

e.4 x1 − x3 = 1

x1 + 3x2 + x3 = 0

x1 + x2 + x3 = 1 .

Answer. x1 = 54 , x2 = −1

2 , x3 = 14 .5

f.6 x1 − x3 = 1

x1 + 3x2 + x3 = 0

x1 + x2 + x3 = 1 .

Answer. x1 = 54 , x2 = −1

2 , x3 = 14 .7

g.8 x1 + x2 − x3 = 1

x1 + 3x2 + 2x3 = 2

x1 + x2 − 3x3 = 1 .

Answer. x1 = 12 , x2 = 1

2 , x3 = 0.9

h.10 x1 + 3x2 + 2x3 = 2

x1 + x2 − 3x3 = 1

2x2 + 5x3 = −1 .

Answer. The system has no solution.11

3. Let A be an n × n matrix.12

a. Show that13

|Adj A| = |A|n−1 .

Hint. Recall that AAdj A = |A|I , so that |AAdjA| = det (|A|I) = |A|n.14

Page 96: Lectures on Linear Algebra Philip Korman

96 CHAPTER 3. DETERMINANTS

b. Show that AdjA is singular if and only if A is singular.1

4. a. Show that a lower triangular matrix is invertible if an only if all of its2

diagonal entries are non-zero.3

b. Show that the inverse of a non-singular lower triangular matrix is also4

lower triangular.5

5. Let A be a nonsingular matrix with integer entries. Show that the inverse6

matrix A−1 contains only integer entries if and only if |A| = ±1.7

Hint. If |A| = ±1, then by (3.2): A−1 = ±Adj A has integer entries. Con-8

versely, suppose that every entry of the inverse matrix A−1 is an integer. It9

follows that |A| and |A−1| are both integers. Since we have10

|A| |A−1| = |AA−1| = |I | = 1 ,

it follows that |A| = ±1.11

6. Show that for any vectors in R312

a. a · (b× c) = (a × b) · c.13

b. a × (b× c) = b (a · c) − c (a · b).14

c. (a× b) · (c× d) = (a · c) (b · d) − (a · d) (b · c).15

Page 97: Lectures on Linear Algebra Philip Korman

Chapter 41

Eigenvectors and Eigenvalues2

4.1 Characteristic Equation3

The vector z =

[

1−1

]

is very special for the matrix A =

[

3 11 3

]

. Calcu-4

late5

A z =

[

3 1

1 3

] [

1

−1

]

=

[

2

−2

]

= 2

[

1

−1

]

= 2z ,

so that Az = 2z, and the vectors z and Az go along the same line. We say6

that z is an eigenvector of A corresponding to an eigenvalue 2.7

In general, we say that a vector x ∈ Rn is an eigenvector of an n × n8

matrix A, corresponding to an eigenvalue λ if9

(1.1) Ax = λx , x 6= 0 .

(Eigenvalue is a number denoted by a Greek letter lambda.) Notice that10

the zero vector is not eligible to be an eigenvector. If A is 2 × 2, then in11

components an eigenvector must satisfy x =

[

x1

x2

]

6=[

00

]

.12

If c 6= 0 is any scalar, then13

A (c x) = cAx = cλx = λ (c x) ,

which implies that c x is also an eigenvector of the matrix A, corresponding14

to the same eigenvalue λ. In particular, c

[

1−1

]

gives us infinitely many15

eigenvectors of the 2 × 2 matrix A above, corresponding to the eigenvalue16

λ = 2.17

97

Page 98: Lectures on Linear Algebra Philip Korman

98 CHAPTER 4. EIGENVECTORS AND EIGENVALUES

Let us rewrite (1.1) as Ax = λIx, or Ax−λIx = 0, and then in the form1

(1.2) (A − λI)x = 0 ,

where I is the identity matrix. To find x one needs to solve a homoge-2

neous system of linear equations, with the matrix A−λI . To have non-zero3

solutions x 6= 0, the determinant must be zero:4

(1.3) |A − λI | = 0 .

Expanding this determinant gives a polynomial equation for λ, called the5

characteristic equation, and its roots are the eigenvalues. (The polynomial6

itself is called the characteristic polynomial.) If the matrix A is 2×2, obtain7

a quadratic equation, which has two roots λ1 and λ2 (possibly equal). In8

case A is 3 × 3, one needs to solve a cubic equation, with three roots λ1,9

λ2 and λ3 (possibly repeated), and so on for larger A. To calculate the10

eigenvectors corresponding to λ1, we solve the system11

(A − λ1I)x = 0 ,

and proceed similarly for other eigenvalues.12

Example 1 Consider A =

[

3 1

1 3

]

. Calculate13

A−λI =

[

3 11 3

]

−λ

[

1 00 1

]

=

[

3 11 3

]

−[

λ 00 λ

]

=

[

3 − λ 11 3 − λ

]

.

(To calculate A − λI , subtract λ from each of the diagonal entries of A.)14

The characteristic equation15

|A − λI | =

3 − λ 1

1 3 − λ

= (3 − λ)2 − 1 = 0

has the roots λ1 = 2 and λ2 = 4, the eigenvalues of A (3− λ = ±1).16

(i) To find the eigenvectors corresponding to λ1 = 2, we need to solve the17

system (A − 2I)x = 0 for x =

[

x1

x2

]

, which is18

x1 + x2 = 0

x1 + x2 = 0 .

Page 99: Lectures on Linear Algebra Philip Korman

4.1. CHARACTERISTIC EQUATION 99

(The matrix A − 2I is obtained from A − λI by setting λ = 2.) Discard1

the second equation, set the free variable x2 = c, an arbitrary number, and2

solve for x1 = −c. Obtain: x =

[

−cc

]

= c

[

−11

]

are the eigenvectors3

corresponding to λ1 = 2.4

(ii) To find the eigenvectors corresponding to λ2 = 4, one solves the system5

(A − 4I)x = 0, or6

−x1 + x2 = 0

x1 − x2 = 0 ,

because A−4I =

[

−1 11 −1

]

. Discard the second equation, set x2 = c, and7

solve for x1 = c. Conclusion: x = c

[

1

1

]

are the eigenvectors corresponding8

to λ2 = 4.9

Example 2 Let A =

6 1 5

0 2 0−3 5 −2

.10

The characteristic equation is11

|A − λI | =

6 − λ 1 50 2− λ 0

−3 5 −2 − λ

= 0 .

(Subtract λ from the diagonal entries of A to obtain A − λI .) Expand the12

determinant in the second row, then simplify13

(2− λ) [(6 − λ)(−2− λ) + 15] = 0 ,

14

(2 − λ)(

λ2 − 4λ + 3)

= 0 .

Setting the first factor to zero gives the first eigenvalue λ1 = 2. Setting the15

second factor to zero, λ2 − 4λ + 3 = 0, gives λ2 = 1 and λ3 = 3.16

Next we calculate the corresponding eigenvectors.17

(i) λ1 = 2. The corresponding eigenvectors are solutions of (A − 2I)x = 0.18

Calculate A − 2I =

4 1 5

0 0 0−3 5 −4

. (In future calculations this step will19

Page 100: Lectures on Linear Algebra Philip Korman

100 CHAPTER 4. EIGENVECTORS AND EIGENVALUES

be performed mentally.) Restore the system (A− 2I)x = 0, and discard the1

second equation consting of all zeroes:2

4x1 + x2 + 5x3 = 0

−3x1 + 5x2 − 4x3 = 0 .

We expect to get infinitely many eigenvectors. So let us calculate one of3

them, and multiply the resulting vector by c. To this end, set x3 = 1. The4

system becomes5

4x1 + x2 = −5

−3x1 + 5x2 = 4 .

By Cramer’s rule x1 = −2923 , x2 = 1

23 . Obtain: c

−29/23

1/231

. (Factoring6

123 out and replacing 1

23c by a new arbitrary constant c, we can present the7

same answer in the form c

−291

23

.)8

(ii) λ2 = 1. The corresponding eigenvectors are solutions of (A − I)x = 0.9

Restore this system:10

5x1 + x2 + 5x3 = 0

x2 = 0

−3x1 + 5x2 − 3x3 = 0 .

From the second equation x2 = 0, and then both the first and the third11

equations simplify to x1 + x3 = 0. Set x3 = 1, then x1 = −1. Obtain:12

c

−10

1

.13

(iii) λ3 = 3. The corresponding eigenvectors are solutions of (A− 3I)x = 0.14

Page 101: Lectures on Linear Algebra Philip Korman

4.1. CHARACTERISTIC EQUATION 101

Restore this system:1

3x1 + x2 + 5x3 = 0

−x2 = 0

−3x1 + 5x2 − 5x3 = 0 .

From the second equation x2 = 0, and then both the first equation and the2

third equations simplify to 3x1 + 5x3 = 0. Set x3 = 3 (to avoid fractions),3

then x1 = −5. Obtain: c

−5

03

.4

4.1.1 Properties of Eigenvectors and Eigenvalues5

A square matrix is called triangular if it is either upper triangular, lower6

triangular, or diagonal.7

Property 1 The diagonal entries of a triangular matrix are its eigenvalues.8

9

For example, for A =

2 0 0−1 3 0

3 0 4

the characteristic equation is10

2 − λ 0 0−1 3 − λ 0

3 0 4 − λ

= 0 ,

giving11

(2 − λ) (3 − λ) (4 − λ) = 0 .

The eigenvalues are λ1 = 2, λ2 = 3 and λ3 = 4. In general, the determinant12

of any triangular matrix equals to the product of its diagonal entries, and13

the same reasoning applies.14

For an n × n matrix A define its trace to be the sum of the diagonal15

elements16

trA = a11 + a22 + · · ·+ ann .

Property 2 Let λ1, λ2, . . . , λn be the eigenvalues of an n × n matrix A,17

possibly repeated. Then18

λ1 + λ2 + · · ·+ λn = trA

λ1 · λ2 · · ·λn = |A| .

Page 102: Lectures on Linear Algebra Philip Korman

102 CHAPTER 4. EIGENVECTORS AND EIGENVALUES

These formulas are clearly true for triangular matrices. For example, if1

A =

2 0 0

−1 3 05 −4 3

,

then λ1 = 2, λ2 = 3, λ3 = 3, so that λ1 + λ2 + λ3 = trA = 8, and2

λ1 · λ2 · λ3 = |A| = 18.3

Let us justify the Property 2 for any 2 × 2 matrix A =

[

a11 a12

a21 a22

]

.4

The characteristic equation5

a11 − λ a12

a21 a22 − λ

= (a11 − λ) (a22 − λ) − a12a21 = 0

can be expanded to6

λ2 − (a11 + a22)λ + a11a22 − a12a21 = 0 ,

or7

(1.4) λ2 − (trA) λ + |A| = 0 .

The eigenvalues λ1 and λ2 are the roots of this equation, so that we can8

factor (1.1) as9

(λ − λ1) (λ − λ2) = 0 .

Expanding10

(1.5) λ2 − (λ1 + λ2) λ + λ1λ2 = 0 .

Comparing (1.4) with (1.5), two versions of the same equation, we conclude11

that λ1 + λ2 = trA, and λ1λ2 = |A|, as claimed.12

For example, if13

A =

[

−4 6−1 3

]

,

then λ1 + λ2 = −1, λ1λ2 = −6. We obtain the eigenvalues λ1 = −3 and14

λ2 = 2 without evaluating the characteristic polynomial.15

Property 3 A square matrix A is invertible if and only if all of its eigen-16

values are different from zero.17

Page 103: Lectures on Linear Algebra Philip Korman

4.1. CHARACTERISTIC EQUATION 103

Proof: We know that A is invertible if and only if |A| 6= 0. But,1

|A| = λ1 · λ2 · · ·λn 6= 0 requires all eigenvalues to be different from zero. ♦2

3

It follows that a matrix with the zero eigenvalue λ = 0 is singular.4

Property 4 Let λ be an eigenvalue of an invertible matrix A. Then1

λis5

an eigenvalue of A−1, corresponding to the same eigenvector.6

Proof: By Property 3, λ 6= 0. Multiplying Ax = λx by A−1 from the left7

gives x = λA−1x, or A−1x =1

λx. ♦8

For example, if A has eigenvalues −2, 1, 4, then A−1 has eigenvalues9

−12 , 1, 1

4 .10

We say that two matrices A and B are similar if there is an invertible11

matrix P such that B = P−1AP (one can then express A = PBP−1).12

Property 5 Two similar matrices A and B share the same characteristic13

polynomial, and therefore they have the same set of eigenvalues.14

Proof: The characteristic polynomial of B15

|B − λI | = |P−1AP − λI | = |P−1AP − λP−1IP |= |P−1 (A − λI)P | = |P−1||A − λI ||P | = |A − λI |

is the same as the characteristic polynomial of A, by using properties of16

determinants (on the last step we used that |P−1| = 1|P |). ♦17

Property 6 Let λ be an eigenvalue of A. Then λ2 is an eigenvalue of A2,18

corresponding to the same eigenvector.19

Indeed, multiplying the relation Ax = λx by matrix A from the left gives20

A2x = A (λx) = λAx = λ λx = λ2x .

One shows similarly that λk is an eigenvalue of Ak, for any positive integer k.21

For example, if A has eigenvalues −2, 1, 4, then A3 has eigenvalues −8, 1, 64.22

Exercises23

1. Verify that the vector

10

1

is an eigenvector of the matrix

2 −4 10 2 0

1 −3 2

24

corresponding to the eigenvalue λ = 3.25

Page 104: Lectures on Linear Algebra Philip Korman

104 CHAPTER 4. EIGENVECTORS AND EIGENVALUES

2. Determine the eigenvalues of the following matrices. Verify that the sum1

of the eigenvalues is equal to the trace, while the product of the eigenvalues2

is equal to the determinant.3

a. A =

[

1 2

0 −1

]

.4

Answer. λ1 = 1, λ2 = −1, trA = λ1 + λ2 = 0, |A| = λ1λ2 = −1.5

b.

[

3 00 −4

]

.6

c.

[

3 0−4 5

]

.7

d.

3 1 −2

0 0 40 0 −7

.8

Answer. λ1 = 3, λ2 = 0, λ3 = −7, trA = λ1 + λ2 + λ3 = −4, |A| = 0.9

e. A =

[

3 2

4 1

]

. Answer. λ1 = −1, λ2 = 5.10

f. A =

−2 0 04 2 13 1 2

. Answer. λ1 = −2, λ2 = 1, λ3 = 3.11

g. A =

−2 −1 4

3 2 −50 0 1

. Answer. λ1 = −1, λ2 = 1, λ3 = 1.12

h. A =

[

0 −1

1 0

]

.13

Answer. λ1 = −i, λ2 = i, trA = λ1 + λ2 = 0, detA = λ1λ2 = 1.14

3. Calculate the eigenvalues and the corresponding eigenvectors for the15

following matrices.16

a.

[

2 15 −2

]

. Answer. λ1 = −3 with

[

−15

]

, λ2 = 3 with

[

11

]

.17

b.

[

3 0

0 −5

]

. Answer. λ1 = 3 with

[

1

0

]

, λ2 = −5 with

[

0

1

]

.18

c.

[

4 6

−1 −1

]

. Answer. λ1 = 1 with

[

−2

1

]

, λ2 = 2 with

[

−3

1

]

.19

Page 105: Lectures on Linear Algebra Philip Korman

4.1. CHARACTERISTIC EQUATION 105

d.

[

0 4

1 0

]

. Answer. λ1 = −2 with

[

−2

1

]

, λ2 = 2 with

[

2

1

]

.1

e.

2 0 0 0

0 −3 0 00 0 0 0

0 0 0 5

.2

f. Any n × n diagonal matrix.3

g.

2 1 1−1 −2 1

3 3 0

. Hint. Factor the characteristic equation.4

Answer. λ1 = −3 with

0

−11

, λ2 = 0 with

−1

11

, λ3 = 3 with

1

01

.5

h.

2 −4 10 2 01 −3 2

. Hint. Expand in the second row.6

Answer. λ1 = 1 with

−10

1

, λ2 = 2 with

31

4

, λ3 = 3 with

10

1

.7

i.

1 2 1

2 −2 10 0 5

.8

Answer. λ1 = −3 with

−12

0

, λ2 = 2 with

21

0

, λ3 = 5 with

32

8

.9

4. Let A be a 2 × 2 matrix, with trace 6, and one of the eigenvalues equal10

to −1. What is the determinant |A|. Answer. |A| = −7.11

5. a. Write down two different 2 × 2 matrices with trace equal to 5 and12

determinant equal to 4.13

b. What are the eigenvalues of any such matrix? Answer. 1 and 4.14

6. Let A be a 3 × 3 matrix with the eigenvalues −2, 1, 14 .15

a. Find |A3|. Answer. −18 .16

b. Find |A−1|. Answer. −2.17

Page 106: Lectures on Linear Algebra Philip Korman

106 CHAPTER 4. EIGENVECTORS AND EIGENVALUES

7. Let A be an invertible matrix. Show that zero cannot be an eigenvalue1

of A−1.2

8. Assume that the matrix A has an eigenvalue zero. Show that the matrix3

AB is not invertible, for any matrix B.4

9. Let λ be an eigenvalue of A, corresponding to an eigenvector x, and k5

is any number. Show that kλ be an eigenvalue of kA, corresponding to the6

same eigenvector x.7

10. a. Show that the matrix AT has the same eigenvalues as A.8

Hint. |AT − λI | = | (A − λI)T | = |A − λI |.9

b. Show that the eigenvectors of A and AT are in general different.10

Hint. Consider say A =

[

1 1

0 2

]

.11

11. Let λ be an eigenvalue of A, corresponding to an eigenvector x.12

a. Show that λ2 + 5 is an eigenvalue of A2 + 5I , corresponding to the same13

eigenvector x.14

b. Show that 3λ2 + 5 is an eigenvalue of 3A2 + 5I , corresponding to the15

same eigenvector x.16

c. Consider a quadratic polynomial p(x) = 3x2−7x+5. Define a polynomial17

of matrix A as p(A) = 3A2 − 7A + 5I . Show that p(λ) is an eigenvalue of18

p(A), corresponding to the same eigenvector x.19

12. Let A and B be any two n × n matrices, and c1 and c2 two arbitrary20

numbers.21

a. Show that tr (A + B) = trA+ tr B, and more generally tr (c1A + c2B) =22

c1 trA + c2 trB.23

b. Show that tr (AB) = tr (BA).24

Hint. tr (AB) =

n∑

i,j=1

aijbji =

n∑

i,j=1

bjiaij = tr (BA).25

c. Show that it is impossible to find two n × n matrices A and B, so that26

AB − BA = I .

d.∗ Show that it is impossible to find two n × n matrices A and B, with A27

invertible, so that28

AB − BA = A .

Page 107: Lectures on Linear Algebra Philip Korman

4.2. A COMPLETE SET OF EIGENVECTORS 107

Hint. Multiply both sides by A−1, to obtain A(

A−1B)

−(

A−1B)

A = I .1

13. Show that similar matrices have the same trace.2

14. Suppose that n × n matrices A and B have a common eigenvector x.3

Show that det (AB − BA) = 0.4

Hint. Show that x is an eigenvector of AB − BA, and determine the corre-5

sponding eigenvalue.6

4.2 A Complete Set of Eigenvectors7

Throughout this section A will denote an arbitrary n × n matrix. Eigen-8

vectors of A are vectors in Rn. Recall that the maximal number of linearly9

independent vectors in Rn is n, and any n linearly independent vectors in10

Rn form a basis of Rn. We say that a matrix A has a complete set of eigen-11

vectors if A has n linearly independent eigenvectors. For a 2× 2 matrix one12

needs two linearly independent eigenvectors for a complete set, for a 3 × 313

matrix it takes three, and so on. A complete set of eigenvectors forms a basis14

of Rn. Such eigenvector bases will play a prominent role in the next section.15

The following theorem will provide a condition for A to have a complete set16

of eigenvectors.17

Theorem 4.2.1 Eigenvectors of A corresponding to distinct eigenvalues18

form a linearly independent set.19

Proof: We begin with the case of two eigenvectors u1 and u2 of A,20

corresponding to the eigenvalues λ1 and λ2 respectively, so that Au1 = λ1u1,21

Au2 = λ2u2, and λ1 6= λ1. We need to show that u1 and u2 are linearly22

independent. Assume the opposite is true. Then u2 = αu1 for some number23

α 6= 0 (if λ = 0, then u2 = 0, while eigenvectors are non-zero vectors).24

The vector αu1 corresponds to the eigenvalue λ1, and so Au2 = λ1u2 6=25

λ2u2, contradicting the definition of u2. (The contradiction shows that the26

opposite statement is false, therefore u1 and u2 are linearly independent.)27

Next, we consider the case of three eigenvectors u1, u2, and u3 of A, corre-28

sponding to the eigenvalues λ1, λ2 and λ3 respectively, so that Au1 = λ1u1,29

Au2 = λ2u2, Au3 = λ3u3 and and λ1, λ2, λ3 are three different (distinct)30

numbers. We just proved that u1 and u2 are linearly independent. Now31

we need to prove that u1, u2 and u3 are linearly independent. Assume the32

opposite is true. Then one of these vectors, say u3 is a linear combination33

of the other two, so that34

(2.1) u3 = αu1 + βu2 ,

Page 108: Lectures on Linear Algebra Philip Korman

108 CHAPTER 4. EIGENVECTORS AND EIGENVALUES

with some numbers α and β. Observe that α and β cannot be both zero,1

because otherwise u3 = 0, contradicting the fact that u3 is an eigenvector.2

Multiply both sides of (2.1) by A from the left, and use the fact that we are3

dealing with the eigenvectors:4

Au3 = αAu1 + βAu2 ,

5

(2.2) λ3u3 = αλ1u1 + βλ2u2 .

From the equation (2.2) subtract the equation (2.1) multiplied by λ3. Obtain6

α (λ1 − λ3) u1 + β (λ2 − λ3) u2 = 0 .

We have a linear combination of u1 and u2, with the coefficients α (λ1 − λ3)7

and β (λ2 − λ3) that cannot be both zero, which implies that u1 and u28

are linearly dependent, but we know that they are linearly independent, a9

contradiction.10

By a similar argument we show that any set of four eigenvectors corre-11

sponding to distinct eigenvalues is linearly independent, and so on. ♦12

13

If an n × n matrix A has n distinct eigenvalues λ1, λ2, . . . , λn, then the14

corresponding eigenvectors u1, u2, . . . , un are linearly independent according15

to this theorem, and form a complete set. If A has some repeated eigen-16

values, then it has fewer than n of distinct ones (because the characteric17

equation is a polynomial equation of power n, and it has n roots, possibly18

involving complex numbers). The example below shows that some matrices19

with repeated eigenvalues still have a complete set of eigenvectors.20

Example 2 A =

2 1 1

1 2 11 1 2

. Expanding the characteristic equation21

|A − λI | =

2− λ 1 1

1 2 − λ 11 1 2 − λ

= 0 ,

in say the first row, produces a cubic equation22

λ3 − 6λ2 + 9λ − 4 = 0 .

Page 109: Lectures on Linear Algebra Philip Korman

4.2. A COMPLETE SET OF EIGENVECTORS 109

To solve it we need to guess a root. λ1 = 1 is a root, which implies that the1

cubic polynomial has a factor λ − 1. The second factor is found by division2

of the polynomials, giving3

(λ − 1)(

λ2 − 5λ + 4)

= 0 .

Setting the second factor to zero, λ2 − 5λ + 4 = 0, we find the other two4

roots λ2 = 1 and λ3 = 4. The eigenvalue λ1 = 1 is repeated, while the5

eigenvalue λ3 = 4 is simple. Next we compute the eigenvectors.6

To find the eigenvectors of the double eigenvalue λ1 = 1, one needs to7

solve the system (A − I)x = 0, or8

x1 + x2 + x3 = 09

x1 + x2 + x3 = 010

x1 + x2 + x3 = 0 .

Discarding both the second and the third equations, we are left with11

x1 + x2 + x3 = 0 .

Here x2 and x3 are free variables. Letting x3 = t and x2 = s, two arbitrary12

constants, calculate x1 = −t − s. The solution set is then13

−t − s

st

= t

−1

01

+ s

−1

10

= tu1 + su2 ,

where u1 =

−10

1

, and u2 =

−11

0

. Conclusion: the linear combina-14

tions with arbitrary coefficients, or the span, of two linearly independent15

eigenvectors u1 and u2 gives us the space of all eigenvectors, corresponding16

to λ1 = 1, also known as the eigenspace of λ1 = 1.17

Let us find the eigenvectors, corresponding to the eigenvalue λ3 = 4. We18

need to solve the system (A − 4I)x = 0, or19

−2x1 + x2 + x3 = 020

x1 − 2x2 + x3 = 021

x1 + x2 − 2x3 = 0 .

Page 110: Lectures on Linear Algebra Philip Korman

110 CHAPTER 4. EIGENVECTORS AND EIGENVALUES

We discard the third equation as superfluous, because adding the first two1

equations gives the negative of the third. In the remaining equations2

−2x1 + x2 + x3 = 03

x1 − 2x2 + x3 = 0

set x3 = 1, and then solve the system4

−2x1 + x2 = −1

x1 − 2x2 = −1

for x1 and x2, obtaining x1 = 1 and x2 = 1. Conclusion: c

11

1

are5

the eigenvectors corresponding to λ3 = 4, with c arbitrary. The answer6

can also be written as c u3, where u3 =

11

1

is one of the eigenvectors7

corresponding to λ3 = 4.8

Observe that u3 is not in the span of u1 and u2 (because vectors in9

that span are eigenvectors corresponding to λ1). By Theorem 1.5.1 the10

vectors u1, u2, u3 are linearly independent, so that they form a complete set11

of eigenvectors.12

Example 3 Let A =

[

3 −2

0 3

]

. Here λ1 = λ2 = 3 is a repeated eigen-13

value. The system (A − 3I)x = 0 reduces to14

−2x2 = 0 .

So that x2 = 0, while x1 is arbitrary. There is only one linearly independent15

eigenvector

[

x1

0

]

= x1

[

10

]

. This matrix does not have a complete set of16

eigenvectors.17

4.2.1 Complex Eigenvalues18

For the matrix A =

[

0 −11 0

]

the characteristic equation is19

|A− λI | =∣

−λ −11 −λ

= λ2 + 1 = 0 .

Page 111: Lectures on Linear Algebra Philip Korman

4.2. A COMPLETE SET OF EIGENVECTORS 111

Its roots are λ1 = i, and λ2 = −i. The corresponding eigenvectors will also1

have complex valued entries, although the procedure to find them remains2

the same.3

(i) λ1 = i. The corresponding eigenvectors satisfy the system (A − iI)x = 0,4

or in components5

−ix1 − x2 = 0

x1 − ix2 = 0 .

We discard the second equation, because it can be obtained multiplying the6

first equation by i. In the first equation7

−ix1 − x2 = 0

set x2 = 1, then x1 = −1

i= i. Obtain c

[

i1

]

, where c is any complex8

number.9

(ii) λ2 = −i. The corresponding eigenvectors satisfy the system (A + iI)x =10

0, or in components11

ix1 − x2 = 0

x1 + ix2 = 0 .

We discard the second equation, because it can be obtained multiplying the12

first equation by −i. In the first equation13

ix1 − x2 = 0

set x2 = 1, then x1 =1

i= −i. Obtain c

[

−i1

]

, where c is any complex14

number.15

The eigenvalues of this matrix are complex conjugates of each other.16

Recall that given a complex number z = x + iy, with real x and y, one17

defines the complex conjugate as z = x − iy. If z = x, a real number, then18

z = z = x. One has zz = x2 + y2 = |z|2, where |z| =√

x2 + y2 is called the19

modulus of z. Given complex numbers z1, z2, . . . , zn, one has20

z1 + z2 + · · ·+ zn = z1 + z2 + · · ·+ zn ,

Page 112: Lectures on Linear Algebra Philip Korman

112 CHAPTER 4. EIGENVECTORS AND EIGENVALUES

1

z1z2 · · ·zn = z1z2 · · ·zn .

Given a vector z =

z1

z2...

zn

, with complex entries, one defines its complex2

conjugate as z =

z1

z2...

zn

. The eigenvectors of the matrix A above were3

complex conjugates of one another, as well as the eigenvalues. The same is4

true in general, as the following theorem shows.5

Theorem 4.2.2 Let A be a square matrix with real entries. Let λ be a6

complex (not real) eigenvalue, and z is a corresponding complex eigenvector.7

Then λ is also an eigenvalue, and z a corresponding eigenvector.8

Proof: We are given that9

Az = λz .

Take complex conjugates of both sides (elements of A are real numbers)10

Az = λz ,

which implies that λ is an eigenvalue, and z a corresponding eigenvector.11

(The i-th component of Az is∑n

k=1 aikzk, and∑n

k=1 aikzk =∑n

k=1 aikzk.)12

Exercises13

1. Find the eigenvectors of the following matrices, and determine if they14

form a complete set.15

a.

[

1 2

0 −1

]

.16

Answer.

[

−1

1

]

with λ1 = −1 and

[

1

0

]

with λ1 = 1, a complete set.17

b.

[

1 2

0 1

]

.18

Page 113: Lectures on Linear Algebra Philip Korman

4.2. A COMPLETE SET OF EIGENVECTORS 113

Answer.

[

1

0

]

corresponding to λ1 = λ2 = 1, not a complete set.1

c.

[

1 0

0 1

]

.2

Answer.

[

10

]

and

[

01

]

corresponding to λ1 = λ2 = 1, a complete set.3

d.

1 3 6−3 −5 −6

3 3 4

.4

Hint. Observe that λ1 = −2 is a root of the characteristic equation5

λ3 − 12λ − 16 = 0 ,

then obtain the other two roots λ2 = −2 and λ1 = 4 by factoring.6

Answer.

−20

1

and

−11

0

corresponding to λ1 = λ2 = −2, and

1−1

1

7

corresponding to λ3 = 4, a complete set.8

e.

0 1 10 0 10 0 1

.9

Answer.

10

0

corresponding to λ1 = λ2 = 0, and

21

1

corresponding to10

λ3 = 1, not a complete set.11

f.

−1 1 1

1 −1 11 0 0

.12

Answer.

−21

1

corresponding to λ1 = −2,

−1−1

1

corresponding to13

λ2 = −1,

1

11

corresponding to λ3 = 1, a complete set.14

g.

0 1 2

−5 −3 −71 0 0

.15

Page 114: Lectures on Linear Algebra Philip Korman

114 CHAPTER 4. EIGENVECTORS AND EIGENVALUES

Answer.

−1−1

1

corresponding to λ1 = λ2 = λ3 = −1, not a complete set.1

2

2. Find the eigenvalues and the corresponding eigenvectors.3

a.

[

1 1−1 1

]

.4

Answer. λ1 = 1− i with

[

i1

]

, and λ2 = 1 + i with

[

−i1

]

.5

b.

3 3 2

1 1 −2−3 −1 0

.6

Answer. λ1 = −2i with

i

−i1

, λ2 = 2i with

−i

i1

, λ3 = 4 with

−1

−11

.7

8

c.

[

cos θ − sin θsin θ cos θ

]

, θ is a real number.9

Hint. λ1 = cos θ − i sinθ, λ2 = cos θ + i sin θ.10

3. Let A be an n × n matrix, and n is odd. Show that A has at least one11

real eigenvalue.12

Hint. The characteristic equation is a polynomial equation of odd degree.13

4. Find the complex conjugate z and the modulus |z| for the following14

numbers.15

a. 3− 4i. b. 5i. c. −7. d. cos π5 + i sin π

5 .16

4.3 Diagonalization17

An n × n matrix A18

A =

a11 a12 . . . a1n

a21 a22 . . . a2n

......

...an1 an2 . . . ann

= [C1 C2 . . .Cn]

Page 115: Lectures on Linear Algebra Philip Korman

4.3. DIAGONALIZATION 115

can be written through its column vectors, where1

C1 =

a11

a21...

an1

, C2 =

a12

a22...

an2

, . . . , Cn =

a1n

a2n

...

ann

.

Recall that given a vector x =

x1

x2...

xn

, the product Ax was defined as the2

vector3

(3.1) Ax = x1C1 + x2C2 + · · ·+ xnCn .

If B = [K1 K2 . . .Kn] is another n×n matrix, which is also written through4

its column vectors K1, K2, . . . , Kn, the product AB was defined as follows5

AB = A[K1 K2 . . .Kn] = [AK1 AK2 . . .AKn] ,

where the products AK1, AK2, . . . , AKn are calculated using (3.1).6

Let D be a diagonal matrix7

(3.2) D =

λ1 0 . . . 00 λ2 . . . 0...

......

0 0 . . . λn

.

Calculate the product8

A D =

A

λ1

0...0

A

0λ2...0

. . . A

00...

λn

= [λ1C1 λ2C2 . . . λnCn] .

Conclusion: multiplying a matrix A from the right by a diagonal matrix D,9

results in the columns of A being multiplied by the corresponding entries10

of D. In particular, to multiply two diagonal matrices (in either order)11

one multiplies the corresponding diagonal entries. For example, let D1 =12

Page 116: Lectures on Linear Algebra Philip Korman

116 CHAPTER 4. EIGENVECTORS AND EIGENVALUES

a 0 0

0 b 00 0 c

and D2 =

2 0 0

0 3 00 0 4

, then1

D1D2 = D2D1 =

2a 0 00 3b 0

0 0 4c

.

Another example:2

a11 a12 a13

a21 a22 a23

a31 a32 a33

2 0 00 3 0

0 0 4

=

2a11 3a12 4a13

2a21 3a22 4a23

2a31 3a32 4a33

.

Suppose now that the n×n matrix A has a full set of n linearly indepen-3

dent eigenvectors u1, u2, . . . , un, so that Au1 = λ1u1, Au2 = λ2u2, . . . , Aun =4

λnun (the eigenvalues λ1, λ2, . . . , λn are not necessarily different). Form a5

matrix P = [u1 u2 . . . un], using the eigenvectors as columns. Observe6

that P has an inverse matrix P−1, because the columns of P are linearly7

independent. Calculate8

(3.3) A P = [A u1 A u2 . . . A un] = [λ1 u1 λ2 u2 . . . λn un] = P D ,

where D is a diagonal matrix, shown in (3.2), with the eigenvalues of A on9

the diagonal. Multiplying both sides from the left by P−1, obtain10

(3.4) P−1 A P = D .

Similarly, multiplying by P−1 from the right:11

(3.5) A = P D P−1 .

One refers to the formulas (3.4) and (3.5) as giving the diagonalization of the12

matrix A, and the matrix A is called diagonalizable. Diagonalizable matrices13

are similar to diagonal ones. The matrix P is called the diagonalizing matrix.14

There are infinitely many choices of the diagonalizing matrix P , because15

eigenvectors may be multiplied by arbitrary numbers.16

Recall that any n linearly independent vectors form a basis of Rn. Let17

us now use the eigenvector basis B = {u1, u2, . . . , un}. Any vector x ∈ Rn18

can be decomposed as x = x1u1 +x2u2 + · · ·+xnun by using its coordinates19

Page 117: Lectures on Linear Algebra Philip Korman

4.3. DIAGONALIZATION 117

[x]B =

x1

x2...

xn

with respect to the basis B. Calculate1

Ax = x1Au1 + x2Au2 + · · ·+ xnAun = x1λ1u1 + x2λ2u2 + · · ·+ xnλnun .

It follows that [Ax]B =

λ1x1

λ2x2...

λnxn

, and then2

[Ax]B = D[x]B .

So that in the eigenvector basis B the function Ax (or the transformation3

Ax) is represented by a diagonal matrix D.4

Example 1 The matrix A =

[

1 41 −2

]

has eigenvalues λ1 = −3 with the5

corresponding eigenvector u1 =

[

−11

]

, and λ2 = 2 with the correspond-6

ing eigenvector u2 =

[

41

]

. Here P =

[

−1 41 1

]

, and D =

[

−3 00 2

]

.7

Calculate P−1 =1

5

[

−1 41 1

]

. The formula (3.4) becomes8

1

5

[

−1 41 1

] [

1 41 −2

][

−1 41 1

]

=

[

−3 00 2

]

.

Not every matrix can be diagonalized. It follows from (3.3) that the9

columns of the diagonalizing matrix P are eigenvectors of A, and these10

eigenvectors must be linearly independent in order for P−1 to exist. We11

conclude that a matrix A is diagonalizible if and only if it has a complete12

set of eigenvectors.13

Example 2 The matrix B =

[

2 1−1 0

]

has a repeated eigenvalue λ1 =14

λ2 = 1, but only one linearly independent eigenvector u =

[

−11

]

. The15

matrix B is not diagonalizable.16

Page 118: Lectures on Linear Algebra Philip Korman

118 CHAPTER 4. EIGENVECTORS AND EIGENVALUES

Example 3 Recall the matrix1

A =

2 1 11 2 1

1 1 2

from the preceding section. It has a repeated eigenvalue λ1 = λ2 = 1,2

together with λ3 = 4, and a complete set of eigenvectors u1 =

−101

, and3

u2 =

−1

10

corresponding to λ1 = λ2 = 1, and u3 =

1

11

corresponding4

to λ3 = 4. This matrix is diagonalizable, with5

P =

−1 −1 10 1 1

1 0 1

, P−1 =1

3

−1 −1 2−1 2 −1

1 1 1

, D =

1 0 00 1 0

0 0 4

.

6

For any two diagonal matrices of the same size7

D1D2 = D2D1 ,

as was mentioned above. For general n × n matrices A and B, the relation8

(3.6) AB = BA

is rare. The following theorem explains why. If AB = BA, one says that9

the matrices A and B commute. Any two diagonal matrices commute.10

Theorem 4.3.1 Two diagonalizable matrices commute if and only if they11

share the same set of eigenvectors.12

Proof: If two diagonalizable matrices A and B share the same set of13

eigenvectors, they share the same diagonalizing matrix P , so that A =14

PD1P−1 and B = PD2P

−1, with two diagonal matrices D1 and D2. It15

follows that16

AB = PD1P−1PD2P

−1 = PD1

(

P−1P)

D2P−1 = PD1D2P

−1

= PD2D1P−1 = PD2P

−1PD1P−1 = BA .

The proof of the converse statement is not included. ♦17

Page 119: Lectures on Linear Algebra Philip Korman

4.3. DIAGONALIZATION 119

Recall that powers of a square matrix A are defined as follows: A2 = AA,1

A3 = A2A, A4 = A3A, and so on. If A is diagonalizable, then2

A = PDP−1 ,

where D is a diagonal matrix with the eigenvalues of A on the diagonal.3

Calculate4

A2 = AA = PDP−1 PDP−1 = PDDP−1 = PD2P−1 ,

and similarly for other powers5

Ak = PDkP−1 = P

λk1 0 . . . 0

0 λk2 . . . 0

......

...0 0 . . . λk

n

P−1 .

Define the limit limk→∞ Ak by taking the limits of each component of Ak.6

If the eigenvalues of A satisfy |λi| < 1 for all i, then limk→∞ Ak = O the7

matrix with all entries equal to zero, called the zero matrix. Indeed, Dk8

tends to the zero matrix, while P and P−1 are fixed.9

Example 4 Let A =

[

1 8

0 −1

]

. Calculate A57.10

The eigenvalues of this upper triangular matrix A are λ1 = 1 and λ2 = −1.11

Since λ1 6= λ2, the corresponding eigenvectors are linearly independent, and12

A is diagonalizable, so that13

A = P

[

1 0

0 −1

]

P−1 ,

with the appropriate diagonalizing matrix P , and the corresponding P−1.14

Then15

A57 = P

[

157 0

0 (−1)57

]

P−1 = P

[

1 0

0 −1

]

P−1 = A =

[

1 8

0 −1

]

.

Similarly, Ak = A if k is an odd integer, and Ak = I if k is an even integer.16

Exercises17

Page 120: Lectures on Linear Algebra Philip Korman

120 CHAPTER 4. EIGENVECTORS AND EIGENVALUES

1. If the matrix A is diagonalizable, determine the diagonalizing matrix P1

and the diagonal matrix D, and verify that AP = PD.2

a. A =

[

4 −2

1 1

]

. Answer. P =

[

2 1

1 1

]

, D =

[

3 0

0 2

]

.3

b. A =

[

2 −10 2

]

. Answer. Not diagonalizable.4

c. A =

[

2 00 −7

]

. Answer. The matrix is already diagonal, P = I .5

d. A =

2 −1 1

0 2 10 0 2

. Answer. Not diagonalizable.6

e. A =

1 3 6

−3 −5 −63 3 4

. Hint. The eigenvalues and the eigenvectors7

of this matrix were calculated in the preceding set of exercises.8

Answer. P =

−2 −1 1

0 1 −11 0 1

, D =

−2 0 0

0 −2 00 0 4

.9

f. A =

1 1 1

1 1 11 0 2

.10

Answer. P =

−2 −1 1

1 −1 11 1 1

, D =

0 0 0

0 1 00 0 3

.11

g. A =

1 1 11 1 11 1 1

.12

Answer. P =

−1 −1 10 1 1

1 0 1

, D =

0 0 00 0 0

0 0 3

.13

h. A =

1 2 3 40 1 2 3

0 0 1 20 0 0 1

. Answer. Not diagonalizable.14

Page 121: Lectures on Linear Algebra Philip Korman

4.3. DIAGONALIZATION 121

i. A =

[

a b − a

0 b

]

, b 6= a. Answer. P =

[

1 1

0 1

]

, D =

[

a 0

0 b

]

.1

2. Show that

[

a b − a

0 b

]k

=

[

ak bk − ak

0 bk

]

.2

3. Let A be a 2 × 2 matrix with positive eigenvalues λ1 6= λ2.3

a. Explain why A is diagonalizable, and how one constructs a non-singular4

matrix P such that A = P

[

λ1 0

0 λ2

]

P−1.5

b. Define the square root of matrix A as√

A = P

[ √λ1 0

0√

λ2

]

P−1. Show6

that(√

A)2

= A.7

c. Let B =

[

14 −10

5 −1

]

. Find√

B. Answer.√

B =

[

4 −2

1 1

]

.8

d. Are there any other matrices C with the property A = C2?9

Hint. Try C = P

[

±√

λ1 0

0 ±√

λ2

]

P−1.10

4. Let A =

[

2 1

−2 −1

]

. Show that Ak = A, where k is any positive integer.11

12

5. Let A =

[

1 1

−3/4 −1

]

. Show that limk→∞ Ak = O, where the limit of13

a sequence of matrices is calculated by taking the limit of each component.14

6. Let A be a 3×3 matrix with the eigenvalues 0,−1, 1. Show that A7 = A.15

16

7. Let A be a 4 × 4 matrix with the eigenvalues −i, i,−1, 1. Show that17

A4 = I .18

Page 122: Lectures on Linear Algebra Philip Korman

Chapter 51

Orthogonality and Symmetry2

5.1 Inner Products3

Given two vectors in Rn, a =

a1

a2...

an

and b =

b1

b2...bn

, define their inner4

product (also known as scalar product or dot product) as5

a · b = a1b1 + a2b2 + · · ·+ anbn .

In three dimensions (n = 3) this notion was used in Calculus to calculate the6

length of a vector ||a|| =√

a · a =√

a21 + a2

2 + a23, and the angle θ between7

a and b, given by cos θ =a · b

||a|| ||b||. In particular, a and b are perpendicular8

if and only if a · b = 0. Similarly, the projection of b on a was calculated as9

follows10

Proj a b = ||b|| cosθa

||a|| =||a|| ||b|| cosθ

||a||2 a =a · b||a||2 a .

(Recall that ||b|| cosθ is the length of the projection vector, whilea

||a|| gives11

the unit vector in the direction of a.)12

In dimensions n > 3 these formulas are taken as the definitions of the13

corresponding notions. Namely, the length (or the norm, or the magnitude)14

of a vector a is defined as15

||a|| =√

a · a =√

a21 + a2

2 + · · ·+ a2n .

122

Page 123: Lectures on Linear Algebra Philip Korman

5.1. INNER PRODUCTS 123

Vectors a and b are called orthogonal if1

a · b = 0 .

Define the projection of b ∈ Rn on a ∈ Rn as2

Proj a b =a · b||a||2 a .

Let us verify that subtracting from b its projection on a gives a vector3

orthogonal to a. In other words, that b−Proj a b is orthogonal to a. Indeed,4

a · (b − Proj a b) = a · b − a · b||a||2 a · a = a · b − a · b = 0 ,

using the distributive property of inner product.5

For example if a =

1

−20

2

and b =

2

1−4

3

are two vectors in R4, then6

a · b = 6, ||a|| = 3, and7

Proj a b =6

32a =

2

3a =

2

3

1−2

02

=

2/3−4/3

04/3

.

Given vectors u, v and w in Rn, and a number c, the following properties8

follow immediately from the definitions:9

u · v = v · uu · (v + w) = u · v + u · w(u + v) · w = u · w + v · w

(cu) · v = c (u · v) = u · (cv)

||cu|| = |c| ||u|| .

In particular, if u and v are orthogonal the Pythagorean Theorem holds:10

||u + v||2 = ||u||2 + ||v||2 .

Indeed, we are given that u · v = 0, and then11

||u + v||2 = (u + v) · (u + v) = u · u + 2u · v + v · v = ||u||2 + ||v||2 .

Page 124: Lectures on Linear Algebra Philip Korman

124 CHAPTER 5. ORTHOGONALITY AND SYMMETRY

If a vector u has length one, ||u|| = 1, u is called unit vector. Of all1

the multiples k v of a vector v ∈ Rn one often wishes to the select the unit2

vector. Choosing k = 1||v|| produces such a vector, 1

||v||v = v||v|| . Indeed,3

|| 1

||v||v|| =1

||v|| ||v|| = 1 .

The vector u = v||v|| is called the normalization of v. Projection of a vector4

b on a unit vector u is Proj u b = b · u u.5

Vector x ∈ Rn is a column vector (or an n × 1 matrix), while xT is a6

row vector (or an 1 × n matrix). One can express the inner product of two7

vectors in Rn in terms of the matrix product8

x · y = xT y .

If A is an n × n matrix, then9

Ax · y = x · ATy ,

for any x, y ∈ Rn. Indeed,10

Ax · y = (Ax)T y = xT AT y = x · ATy .

Given two vectors x, y ∈ Rn define the angle θ between them as11

cos θ =x · y

||x|| ||y|| .

To see that −1 ≤ x · y||x|| ||y|| ≤ 1 (so that θ can be determined), we need the12

following Cauchy-Schwarz inequality13

(1.1) |x · y| ≤ ||x|| ||y|| .

To justify this inequality, for any constant λ we expand14

0 ≤ ||λx + y||2 = (λx + y) · (λx + y) = λ2||x||2 + 2λx · y + ||y||2 .

On the right we have a quadratic polynomial in λ, which is non-negative for15

all λ. It follows that this polynomial cannot have two real roots, so that its16

coefficients satisfy17

(2 x · y)2 − 4||x|| ||y|| ≤ 0 ,

which implies (1.1).18

Page 125: Lectures on Linear Algebra Philip Korman

5.1. INNER PRODUCTS 125

Exercises1

1. Let u1 =

1

22

, u2 =

2

3−4

, u3 =

1

0−5

, v1 =

02

2−1

, v2 =2

11

−2−2

, v3 =

11

−11

.3

a. Verify that u1 is orthogonal to u2, and v1 is orthogonal to v2.4

b. Calculate (2u1 − u2) · 3u3.5

c. Calculate ||u1||, ||v1||, ||v2||, ||v3||.6

d. Normalize u1, v1, v2, v3.7

e. Find the acute angle between v1 and v3. Answer. π − arccos(−16 ).8

f. Calculate the projection Proju3u1.9

g. Calculate Proju1u3.10

h. Calculate Projv1v3.11

i. Calculate Projv1v2. Answer. The zero vector.12

2. Show that (u + v) · (u − v) = ||u||2 − ||v||2, for any u, v ∈ Rn.13

3. Show that the diagonals of a parallelogram are orthogonal if and only if14

the parallelogram is a rhombus (all sides equal).15

Hint. Vectors u + v and u − v give the diagonals.16

4. If ||u|| = 4, ||v|| = 3, and u · v = −1, find ||u + v|| and ||u− v||.17

Hint. Begin with ||u + v||2.18

5. Let u ∈ Rn, and e1, e2, . . . , en be the standard basis. Let θi denote the19

angle between the vectors u and ei, for all i (θi is called the direction angle,20

while cos θi is the the direction cosine).21

a. Show that22

cos2 θ1 + cos2 θ2 + · · ·+ cos2 θn = 1 .

Hint. cos θi = ui

||u|| .23

b. What familiar formula one gets in case n = 2?24

Page 126: Lectures on Linear Algebra Philip Korman

126 CHAPTER 5. ORTHOGONALITY AND SYMMETRY

6. Show that for u, v ∈ Rn the following triangle inequality holds1

||u + v|| ≤ ||u||+ ||v|| ,

and interpret it geometrically.2

Hint. Using the Cauchy-Schwarz inequality, ||u+v||2 = ||u||2+2u·v+||v||2 ≤3

||u||2 + 2||u|| ||v||+ ||v||2.4

7. Let u =

u1

u2

u3

, v =

v1

v2

v3

and w =

w1

w2

w3

be arbitrary vectors.5

Verify that6

u · (v + w) = u · v + u · w .

5.2 Orthogonal Bases7

Vectors v1, v2, . . . , vp in Rn are said to form an orthogonal set if any two8

of these vectors are orthogonal, or vi · vj = 0 for all i 6= j. If vectors9

u1, u2, . . . , up in Rn form an orthogonal set, and in addition they are unit10

vectors (||ui|| = 1 for all i), we say that u1, u2, . . . , up form an orthonormal11

set. An orthogonal set v1, v2, . . . , vp can be turned into an orthonormal set12

by normalization, or taking ui =vi

||vi||for all i. For example, the vectors13

v1 =

02

2−1

, v2 =

40

12

, and v3 =

−11

02

form an orthogonal set.14

Indeed, v1 · v2 = v1 · v3 = v2 · v3 = 0. Calculate ||v1|| = 3, ||v2|| =√

21,15

and ||v3|| =√

6. Then the vectors u1 =1

3v1 =

1

3

02

2−1

, u2 =1√21

v2 =16

1√21

401

2

, and u3 =1√6v3 =

1√6

−110

2

form an orthonormal set.17

Theorem 5.2.1 Suppose that vectors v1, v2, . . . , vp in Rn are all non-zero,18

and they form an orthogonal set. Then they are linearly independent.19

Page 127: Lectures on Linear Algebra Philip Korman

5.2. ORTHOGONAL BASES 127

Proof: We need to show that the relation1

(2.1) x1v1 + x2v2 + · · ·+ xpvp = 0

is possible only if all of the coefficients are zero, x1 = x2 = · · · = xp = 0.2

Take the inner product of both sides of (2.1) with v1:3

x1 v1 · v1 + x2 v2 · v1 + · · ·+ xp vp · v1 = 0 .

By orthogonality, all of the terms starting with the second one are zero.4

Obtain5

x1 ||v1||2 = 0 .

Since v1 is non-zero, ||v1|| > 0, and then x1 = 0. Taking the inner product6

of both sides of (2.1) with v2, one shows similarly that x2 = 0, and so on,7

showing that all xi = 0. ♦8

It follows that non-zero vectors forming an orthogonal set provide a9

basis for the subspace that they span, called orthogonal basis. Orthonormal10

vectors give rise to an orthonormal basis.11

Suppose that vectors v1, v2, . . . , vp form an orthogonal basis of some sub-12

space W in Rn. Then any vector w in W can be expressed as13

w = x1v1 + x2v2 + · · ·+ xpvp ,

and the coordinates x1, x2, . . . , xp are easy to express. Indeed, take the inner14

product of both sides with v1 and use the orthogonality:15

w · v1 = x1v1 · v1 ,

giving16

x1 =w · v1

||v1||2.

Taking the inner product of both sides with v2, gives a formula for x2, and17

so on. Obtain:18

(2.2) x1 =w · v1

||v1||2, x2 =

w · v2

||v2||2, . . . , xp =

w · vp

||vp||2.

The resulting decomposition with respect to an orthogonal basis is19

(2.3) w =w · v1

||v1||2v1 +

w · v2

||v2||2v2 + · · ·+ w · vp

||vp||2vp .

Page 128: Lectures on Linear Algebra Philip Korman

128 CHAPTER 5. ORTHOGONALITY AND SYMMETRY

So that any vector w in W is equal to the sum of its projections on the1

elements of an orthogonal basis.2

In case vectors u1, u2, . . . , up form an orthonormal basis of W , and w ∈3

W , then4

w = x1u1 + x2u2 + · · ·+ xpup ,

and in view of (2.2) the coefficients are5

x1 = w · u1 , x2 = w · u2 , . . . , xp = w · up .

The resulting decomposition with respect to an orthonormal basis is6

w = (w · u1) u1 + (w · u2) u2 + · · ·+ (w · up) up .

Suppose W is a subspace of Rn with a basis {w1, w2, . . . , wp}, not neces-7

sarily orthogonal. We say that the vector z ∈ Rn is orthogonal to a subspace8

W if z is orthogonal to any vector in W , notation z ⊥ W . If z is orthogonal9

to the basis elements of W , then z is orthogonal to W . Indeed, decompose10

any element w ∈ W as w = x1w1 + x2w2 + · · ·+ xpwp. Given that z ·wi = 011

for all i, obtain12

z · w = x1 z · w1 + x2 z · w2 + · · ·+ xp z · wp = 0 ,

so that z ⊥ W .13

Given any vector b ∈ Rn and a subspace W of Rn, we say that the14

vector ProjW

b is the projection of b on W if the vector z = b − ProjW

b is15

orthogonal to W .16

Theorem 5.2.2 Assume that {v1, v2, . . . , vp} form an orthogonal basis of a17

subspace W . Then18

(2.4) ProjW

b =b · v1

||v1||2v1 +

b · v2

||v2||2v2 + · · ·+ b · vp

||vp||2vp .

(So that ProjW

b equals to the sum of projections of b on the basis elements.)19

Proof: We need to show that z = b − ProjW

b is orthogonal to all basis20

elements of W (so that z ⊥ W ). Using the orthogonality of vi’s calculate21

z · v1 = b · v1 − (ProjW

b) · v1 = b · v1 −b · v1

||v1||2v1 · v1 = b · v1 − b · v1 = 0 ,

and similarly z · vi = 0 for all i. ♦22

Page 129: Lectures on Linear Algebra Philip Korman

5.2. ORTHOGONAL BASES 129

In case b ∈ W , ProjW

b = b, as follows by comparing the formulas (2.3)1

and (2.4).2

Example 1 Let v1 =

1−1

2

, v2 =

11

0

, b =

11

1

, and W =3

Span{v1, v2}. Let us calculate ProjW

b. Since v1 · v2 = 0, these vectors are4

orthogonal, and then by (2.4)5

ProjW

b =b · v1

||v1||2v1 +

b · v2

||v2||2v2 =

2

6v1 +

2

2v2 =

4/32/3

2/3

.

The set of all vectors that are orthogonal to a subspace W of Rn is called6

the orthogonal complement of W , and is denoted by W⊥ (pronounced “W7

perp”). It is straightforward to verify that W⊥ is a subspace.8

Example 2 Consider a subspace W of R4, W = Span {w1, w2}, where9

w1 =

1

01

−2

, w2 =

0

−10

1

. The subspace W⊥ consists of vectors x =10

x1

x2

x3

x4

that are orthogonal to the basis of W , so that x · w1 = 0 and11

x · w2 = 0, or in components12

x1 + x3 − 2x4 = 0

−x2 + x4 = 0 .

One sees that W⊥ is just the null space N (A) of the matrix A =

[

1 0 1 −2

0 −1 0 1

]

13

of this system, and a calculation shows that14

W⊥ = Span

−10

10

,

21

01

.

Page 130: Lectures on Linear Algebra Philip Korman

130 CHAPTER 5. ORTHOGONALITY AND SYMMETRY

Recall that the vector z = b − ProjW

b is orthogonal to the subspace1

W . In other words, z ∈ W⊥. We conclude that any vector b ∈ Rn can be2

decomposed as3

b = ProjW

b + z ,

with ProjW

b ∈ W , and z ∈ W⊥. If b belongs to W , then b = ProjW

b and4

z = 0. In case b /∈ W , then the vector ProjW

b gives the point in W that is5

closest to b, and ||b − ProjW

b|| = ||z|| is the distance from b to W .6

Fredholm Alternative7

We now revisit linear systems8

(2.5) Ax = b ,

with a given m × n matrix A, and a given vector b ∈ Rm. We shall use the9

corresponding homogeneous system10

(2.6) Av = 0 ,

and the adjoint homogeneous system11

(2.7) ATu = 0 .

Recall that the system (2.5) has a solution if and only if b ∈ R(A), the12

range of A. All solutions of the system (2.7) constitute the null space of AT ,13

N (AT ).14

Theorem 5.2.3 R(A)⊥ = N (AT ).15

Proof: To prove that two sets are identical, one shows that each element16

of either one of the sets belongs to the other set.17

(i) Assume that the vector u ∈ Rm belongs to R(A)⊥. Then18

u · Ax =(

uTA)

x = 0 ,

for all x ∈ Rn. It follows that19

uTA = 0 .

Taking the adjoint gives (2.7), so that u ∈ N (AT ).20

Page 131: Lectures on Linear Algebra Philip Korman

5.2. ORTHOGONAL BASES 131

(ii) Conversely, assume that the vector u ∈ Rm belongs to N (AT ), so that1

AT u = 0. Taking the adjoint gives uT A = 0. Then2

(

uT)

Ax = u · Ax = 0 ,

for all x ∈ Rn. Hence u ∈ R(A)⊥. ♦3

For square matrices A we have the following important consequence.4

Theorem 5.2.4 (Fredholm alternative) Let A be an n×n matrix, b ∈ Rn.5

Then either6

(i) The homogeneous system (2.6) has only the trivial solution, and the7

system (2.5) has a unique solution for any vector b.8

Or else9

(ii) The homogeneous systems (2.6) and (2.7) have non-trivial solutions, and10

the system (2.5) has solutions if and only if b is orthogonal to any solution11

of (2.7).12

Proof: If the determinant |A| 6= 0, then A−1 exists, v = A−10 = 0 is13

the only solution of (2.6), and u = A−1b is the unique solution of (2.5).14

In case |A| = 0, one has |AT | = |A| = 0, so that both systems (2.6) and15

(2.7) have non-trivial solutions. In order for (2.5) to be solvable, b must16

belong to R(A). By the Theorem 5.2.3, R(A) is the orthogonal complement17

of N (AT ), so that b must be orthogonal to all solutions of (2.7). (In this18

case the system (2.5) has infinitely many solutions of the form x+cv, where19

v is any solution of (2.6).) ♦20

Least Squares21

Consider a system22

(2.8) Ax = b ,

with an m × n matrix A and a vector b ∈ Rm. If C1, C2, . . . , Cn are the23

columns of A and x1, x2, . . . , xn are components of x then one can write24

(2.8) as25

x1C1 + x2C2 + · · ·+ xnCn = b .

The system (2.8) is consistent if and only if b belongs to the span of C1, C2, . . . , Cn,26

in other words b ∈ C(A), the column space of A. If b is not in C(A) the27

system (2.8) is inconsistent (there is no solution). What would be a good28

substitute for the solution? One answer to this question is presented next.29

Page 132: Lectures on Linear Algebra Philip Korman

132 CHAPTER 5. ORTHOGONALITY AND SYMMETRY

Assume for simplicity that the columns of A are linearly independent.1

Let p denote the projection of the vector b on C(A), let x be the unique2

solution of3

(2.9) Ax = b .

The vector x is called the least squares solution of (2.8). The formula for x4

is derived next.5

By the definition of projection, the vector b − p is orthogonal to C(A),6

implying that b − p is orthogonal to all columns of A, or b− p is orthogonal7

to all rows of AT , so that8

AT (b − p) = 0 .

In view of (2.9) obtain9

AT Ax = AT b ,

giving10

x =(

ATA)−1

AT b ,

since the matrix ATA is invertible, as is shown in exercises.11

The vector x is the unique solution of the system12

AT Ax = AT b ,

known as the normal equations. The projection of B onto C(A) is13

p = Ax = A(

AT A)−1

AT b ,

and P = A(

ATA)−1

AT is the projection matrix onto C(A). The vector14

Ax = p is the closest element to b in C(A), so that the value of ||Ax− b|| is15

the smallest possible.16

Example 3 The system17

2x1 + x2 = 3

x1 − 2x2 = 4

0x1 + 0x2 = 1

Page 133: Lectures on Linear Algebra Philip Korman

5.2. ORTHOGONAL BASES 133

is clearly inconsistent. The best we can do is to solve the first two equations1

to obtain x1 = 2, x2 = −1. Here A =

2 1

1 −20 0

, b =

3

41

, and a2

calculation gives the least squares solution3

x =(

ATA)−1

AT b =

[

15 00 1

5

][

2 1 01 −2 0

]

341

=

[

2−1

]

.

The column space of A consists of vectors with the third component zero,4

and the projection of b on C(A) is5

p = Ax =

2 1

1 −20 0

[

2−1

]

=

3

40

,

as expected.6

Exercises7

1. Verify that the vectors u1 = 1√2

[

1−1

]

and u2 =

[

1/√

2

1/√

2

]

form an8

orthonormal basis of R2. Then find the coordinates of the vectors e1 =

[

10

]

9

and e2 =

[

01

]

with respect to this basis B = {u1, u2}.10

Answer. [e1]B =

[

1/√

2

1/√

2

]

, [e2]B =

[

−1/√

2

1/√

2

]

.11

2. Verify that the vectors u1 = 1√3

111

, u2 = 1√6

1−2

1

, u3 = 1√2

10

−1

12

form an orthonormal basis of R3. Then find the coordinates of the vector13

v =

1

11

with respect to this basis B = {u1, u2, u3}.14

Answer. [v]B =

√30

0

.15

Page 134: Lectures on Linear Algebra Philip Korman

134 CHAPTER 5. ORTHOGONALITY AND SYMMETRY

3. Let v1 =

2

−12

, v2 =

1

0−1

, b =

1

11

, and W = Span{v1, v2}.1

a. Verify that the vectors v1 and v2 are orthogonal, and explain why these2

vectors form an orthogonal basis of W .3

b. Calculate ProjW

b. Does b belong to W?4

c. Calculate the coordinates of u =

11

−5

with respect to the basis5

B = {v1, v2}. Answer. [u]B =

[

−1

3

]

.6

d. Calculate ProjW

u. Does u belong to W?7

e. Describe geometrically the subspace W .8

f. Find W⊥, the orthogonal complement of W , and describe it geometrically.9

10

4. Let u1 = 12

111

1

, u2 = 12

11

−1

−1

, u3 = 12

1−1−1

1

, b =

2−1

0

−2

, and11

W = Span{u1, u2, u3}.12

a. Verify that the vectors u1, u2, u3 are orthonormal, and explain why these13

vectors form an orthonormal basis of W .14

b. Calculate ProjW

b.15

c. Does b belong to W? If not, what is the point in W that is closest to b?16

d. What is the distance from b to W?17

5. Let W be a subspace of Rn of dimension k. Show that dimW⊥ = n−k.18

6. Let W be a subspace of Rn. Show that(

W⊥)⊥= W .19

7. Let q1, q2, . . . , qk be orthonormal vectors, and a = a1q1 +a2q2 + · · ·+akqk20

their linear combination. Justify the Pythagorean theorem21

||a||2 = a21 + a2

2 + · · ·+ a2k .

8. Let v1, v2, . . . , vn be vectors in Rm. The following n × n determinant22

G =

v1 · v1 v1 · v2 . . . v1 · vn

v2 · v1 v2 · v2 . . . v2 · vn

. . . . . . . . . . . .vn · v1 vn · v2 . . . vn · vn

Page 135: Lectures on Linear Algebra Philip Korman

5.3. GRAM-SCHMIDT ORTHOGONALIZATION 135

is called the Gram determinant or the Gramian.1

a. Show that v1, v2, . . . , vn are linearly dependent if and only if the Gramian2

G = 0.3

b. Let A be an m×n matrix with linearly independent columns. Show that4

the square matrix ATA is invertible and symmetric.5

Hint. The determinant |AT A| is the Gramian of the columns of A.6

9. Consider the system7

2x1 + x2 = 3

x1 − 2x2 = 4

2x1 − x2 = −5 .

a. Verify that this system is inconsistent.8

b. Calculate the least squares solution. Answer. x1 = 0, x2 = 0.9

c. Calculate the projection p of the vector b =

34

−5

on the column space10

C(A) of the matrix of this system, and conclude that b ∈ C(A)⊥.11

Answer. p =

0

00

.12

5.3 Gram-Schmidt Orthogonalization13

A given set of linearly independent vectors w1, w2, . . . , wp in Rn forms a basis14

for the subspace W that they span. It is desirable to have an orthogonal15

basis of the subspace W = Span{w1, w2, . . . , wp}. With an orthogonal basis16

it is easy to calculate the coordinates of any vector w ∈ W , and if a vector17

b is not in W , it is easy to calculate the projection of b on W .18

The Gram-Schmidt orthogonalization process produces an orthogonal ba-19

Page 136: Lectures on Linear Algebra Philip Korman

136 CHAPTER 5. ORTHOGONALITY AND SYMMETRY

sis v1, v2, . . . , vp of the subspace W = Span{w1, w2, . . . , wp} as follows1

v1 = w1

v2 = w2 − w2·v1

||v1||2 v1

v3 = w3 − w3·v1

||v1||2 v1 − w3·v2

||v2||2 v2

· · · · · ·vp = wp − wp·v1

||v1||2 v1 − wp·v2

||v2||2v2 − · · · − wp ·vp−1

||vp−1||2vp−1 .

The first vector w1 is included in the new basis as v1. To obtain v2, we sub-2

tract from w2 its projection on v1. It follows that v2 is orthogonal to v1. To3

obtain v3, we subtract from w3 its projection on the previously constructed4

vectors v1 and v2, in other words, we subtract from w3 its projection on5

the subspace spanned by v1 and v2. By the Theorem 5.2.2, v3 is orthogo-6

nal to that subspace, and in particular, v3 is orthogonal to v1 and v2. In7

general, to obtain vp, we subtract from wp its projection on the previously8

constructed vectors v1, v2, . . . , vp−1. By the Theorem 5.2.2, vp is orthogonal9

to v1, v2, . . . , vp−1.10

The new vectors vi belong to the subspace W because they are linear11

combinations of the old vectors wi. The vectors v1, v2, . . . , vp are linearly12

independent, because they form an orthogonal set, and since their number13

is p, they form a basis of W , an orthogonal basis of W .14

Once the orthogonal basis v1, v2, . . . , vp is constructed, one can obtain15

an orthonormal basis u1, u2, . . . , up by normalization, taking ui =vi

||vi||.16

Example 1 Let w1 =

1−1

−11

, w2 =

1−2

23

, w3 =

01

12

. It is easy17

to check that these vectors are linearly independent, and hence they form a18

basis of W = Span{w1, w2, w3}. We now use the Gram-Schmidt process to19

obtain an orthonormal basis of W .20

We have v1 = w1. Calculate ||v1||2 = ||w1||2 = 4, w2 ·v1 = w2 ·w1 = 4. Then21

v2 = w2 −4

4v1 =

1−2

23

1−1

−11

=

0−1

32

.

Page 137: Lectures on Linear Algebra Philip Korman

5.3. GRAM-SCHMIDT ORTHOGONALIZATION 137

Next, w3 · v1 = 0, w3 · v2 = 6, ||v2||2 = 14, and then1

v3 = w3 − 0 · v1 −6

14v2 =

01

12

− 3

7

0−1

32

=

010/7

−2/78/7

.

The orthogonal basis is then2

v1 =

1−1

−11

, v2 =

0−1

32

, v3 =1

7

010

−28

.

Calculate ||v1|| = 2, ||v2|| =√

14, ||v3|| = 17

√168. The orthonormal basis is3

then4

u1 =1

2

1−1

−11

, u2 =1√14

0−1

32

, u3 =1√168

010

−28

.

5.3.1 QR Factorization5

Let A = [w1 w2 . . . wn] be an m × n matrix, and assume its columns6

w1, w2, . . . , wn are linearly independent. Then they form a basis of the7

column space C(A). Applying the Gram-Schmidt process to the columns8

of A produces an orthonormal basis of C(A). Form an m × n matrix9

Q = [u1 u2 . . . un] with orthonormal columns. From the first line of the10

Gram-Schmidt process we may express the vector w1 as a multiple of u111

(3.1) w1 = r11u1 ,

with the coefficient denoted by r11 (r11 = ||w1||). From the second line of12

the Gram-Schmidt process express w2 as a linear combination of u1 and u213

(3.2) w2 = r12u1 + r22u2 ,

with some coefficients r12 and r22 (r12 = w2 · u1, r22 = w2 · u2). From the14

third line of the Gram-Schmidt process express15

w3 = r13u1 + r23u2 + r33u3 ,

Page 138: Lectures on Linear Algebra Philip Korman

138 CHAPTER 5. ORTHOGONALITY AND SYMMETRY

with the appropriate coefficients (r13 = w3 · u1, r23 = w3 · u2, r33 = w3 · u3).1

The final line of the Gram-Schmidt process gives2

wn = r1nu1 + r2nu2 + · · ·+ rnnun .

Form an n × n upper triangular matrix R3

R =

r11 r12 r13 . . . r1n

0 r22 r23 . . . r1n

0 0 r33 . . . r3n

· · · · · ·0 0 0 . . . rnn

.

Then the definition of matrix multiplication implies that4

(3.3) A = QR ,

what is known as the QR decomposition of the matrix A.5

We now justify the formula (3.3) by comparing the corresponding columns6

of the matrices A and QR. The first column of A is w1, while the first col-7

umn of QR is the product of Q and the vector

r11

0...

0

(the first column of8

R), which gives r11u1, and by (3.1) the first columns are equal. (Recall that9

Q = [u1 u2 . . . un].) The second column of A is w2, while the second column10

of QR is the product of Q and the vector

r12

r22...0

(the second column of11

R), which gives r12u1 + r22u2, and by (3.2) the second columns are equal.12

Similarly, all other columns are equal.13

Example 2 Let us find the QR decomposition of14

A =

1 1 0

−1 −2 1−1 2 1

1 3 2

.

The columns of A are the vectors w1, w2, w3 from the Example 1 above.15

Therefore the matrix Q = [u1 u2 u3 ] has the orthonormal columns u1, u2,16

Page 139: Lectures on Linear Algebra Philip Korman

5.3. GRAM-SCHMIDT ORTHOGONALIZATION 139

u3 produced in the Example 1. To obtain the entries of the matrix R, we1

“reverse” our calculations in the Example 1. Recall that2

w1 = v1 = 2u1 ,

so that r11 = 2. Similarly,3

w2 = v1 + v2 = 2u1 +√

14u2 ,

giving r12 = 2 and r22 =√

14. Finally,4

w3 =3

7v2 + v3 =

3

7

√14u2 +

√168

7u3 ,

so that r13 = 0, r23 = 37

√14, r33 =

√1687 . Then R =

2 2 0

0√

14 37

√14

0 0√

1687

,5

and the QR factorization is6

1 1 0

−1 −2 1−1 2 1

1 3 2

=

1

20 0

−1

2− 1√

14

10√168

−1

2

3√14

− 2√168

1

2

2√14

8√168

2 2 0

0√

14 37

√14

0 0√

1687

.

5.3.2 Orthogonal Matrices7

The matrix Q = [u1 u2 . . . un] in the QR decomposition has orthonormal8

columns. If Q is of size m×n, its transpose QT is an n×m matrix with the9

rows uT1 , uT

2 , . . . , uTn so that QT =

uT1

uT2...

uTn

. The product QTQ is an n × n10

matrix, and we claim that11

(3.4) QTQ = I .

Page 140: Lectures on Linear Algebra Philip Korman

140 CHAPTER 5. ORTHOGONALITY AND SYMMETRY

Indeed, the diagonal entries of the product1

QT Q =

uT1

uT2...

uTn

[u1 u2 . . . un]

are uTi ui = ui ·ui = ||ui||2 = 1, while the off-diagonal ones uT

i uj = ui ·uj = 02

for i 6= j.3

A square n × n matrix with orthonormal columns is called orthogonal4

matrix. For orthogonal matrices the formula (3.4) implies that5

(3.5) QT = Q−1 .

Conversely, if the formula (3.5) holds, then QT Q = I so that Q has or-6

thonormal columns. We conclude that the matrix Q is orthogonal if and7

only if (3.5) holds. The formula (3.5) provides an alternative definition of8

orthogonal matrices.9

We claim that10

||Qx|| = ||x|| ,for any orthogonal matrix Q and x ∈ Rn. Indeed,11

||Qx||2 = Qx ·Qx = x · QTQx = x · Q−1Qx = x · Ix = ||x||2 .

One shows similarly that12

Qx · Qy = x · yfor any x, y ∈ Rn. It follows that the orthogonal transformation Qx preserves13

the length of vectors, and the angles between vectors.14

Equating the determinants of both sides of (3.5), obtain |QT | = |Q−1|,15

giving |Q| = 1|Q| or |Q|2 = 1, which implies that16

|Q| = ±1 ,

for any orthogonal matrix Q.17

A product of two orthogonal matrices P and Q is also an orthogonal18

matrix. Indeed, if PT = P and QT = Q, then19

(PQ)T = QT PT = Q−1P−1 = (PQ)−1 .

Page 141: Lectures on Linear Algebra Philip Korman

5.3. GRAM-SCHMIDT ORTHOGONALIZATION 141

If P is a 2×2 orthogonal matrix, it turns out that either P =

[

cos θ − sin θ

sin θ cos θ

]

1

or P =

[

cos θ sin θsin θ − cos θ

]

, for some number θ. Indeed, let P =

[

α βγ δ

]

.2

We know that the determinant |P | = αδ − βγ = ±1. Let us assume first3

that |P | = αδ − βγ = 1. Then4

P−1 =1

αδ − βγ

[

δ −β

−γ α

]

=

[

δ −β

−γ α

]

,

5

PT =

[

α γβ δ

]

.

Since P−1 = PT , it follows that δ = α and β = −γ, so that P =

[

α −γ

γ α

]

.6

The columns of the orthogonal matrix P are of unit length, so that α2+γ2 =7

1. We can then find a number θ so that α = cos θ and γ = sin θ, and conclude8

that P =

[

cos θ − sin θsin θ cos θ

]

.9

In the other case when |P | = −1, observe that the product of two or-10

thogonal matrices

[

1 0

0 −1

]

P is an orthogonal matrix with determinant11

equal to 1. By the above,

[

1 00 −1

]

P =

[

cos θ − sin θsin θ cos θ

]

for some θ.12

Then, with θ = −ϕ,13

P =

[

1 0

0 −1

]−1 [

cos θ − sin θ

sin θ cos θ

]

=

[

1 0

0 −1

] [

cos θ − sin θ

sin θ cos θ

]

14

=

[

cos θ − sin θ

− sin θ − cos θ

]

=

[

cosϕ sin ϕ

sinϕ − cos ϕ

]

.

Exercises15

1. Use the Gram-Schmidt process to find an orthonormal basis for the16

subspace spanned by the given vectors.17

a. w1 =

1

01

, w2 =

1

11

.18

Page 142: Lectures on Linear Algebra Philip Korman

142 CHAPTER 5. ORTHOGONALITY AND SYMMETRY

Answer. u1 =

1√2

01√2

, u2 =

0

10

.1

b. w1 =

1

−22

, w2 =

−1

21

.2

Answer. u1 = 13

1−2

2

, u2 = 13√

5

−24

5

.3

c. w1 =

2

1−1

0

, w2 =

3

2−4

1

, w3 =

1

10

−2

.4

Answer. u1 = 1√6

2

1−1

0

, u2 = 1√6

−1

0−2

1

, u3 = 12√

3

−1

1−1

−3

.5

d. w1 =

1

1−1

−1

, w2 =

1

00

1

, w3 =

1

10

0

.6

Answer. u1 = 12

1

1−1

−1

, u2 = 1√2

1

00

1

, u3 = 1√2

0

11

0

.7

e. w1 =

3

−211

−1

, w2 =

−1

000

1

. Answer. u1 = 14

3

−211

−1

, u2 = 14

−1

−211

3

.8

9

f. Let W = Span{w1, w2}, where w1, w2 ∈ R5 are the vectors from the10

preceding exercise (e), and b =

1

01

−1−1

. Find the projection ProjW

b.11

Page 143: Lectures on Linear Algebra Philip Korman

5.3. GRAM-SCHMIDT ORTHOGONALIZATION 143

Answer. ProjW

b = u1 − u2.1

2. Find an orthogonal basis for the null-space N (A) of the following matri-2

ces.3

Hint. Find a basis of N (A), then apply the Gram-Schmidt process.4

a. A =

0 2 −1 0−2 1 2 1

−2 3 1 1

.5

Answer. u1 = 1√5

1

002

, u2 = 1√10

2

12

−1

.6

b. A =

[

1 −1 0

1 2 −3

]

. Answer. u1 = 1√3

11

1

.7

c. A =[

1 −1 0 1]

.8

Answer. u1 = 1√2

−1

00

1

, u2 =

0

01

0

, u3 = 1√6

1

20

1

.9

3. Let A = QR be the QR decomposition of A.10

a. Assume that A is a non-singular square matrix. Show that R is also11

non-singular, and all of its diagonal entries are positive.12

b. Show that R = QT A (which gives an alternative way to calculate R).13

4. Find the QR decomposition of the following matrices.14

a. A =

[

3 −14 0

]

.15

Answer. Q =

[

35 −4

545

35

]

, R =

[

5 −35

0 45

]

.16

b. A =

2 −1

−1 12 0

.17

Page 144: Lectures on Linear Algebra Philip Korman

144 CHAPTER 5. ORTHOGONALITY AND SYMMETRY

Answer. Q =

23 −1

3−1

323

23

23

, R =

[

3 −1

0 1

]

.1

c. A =

1 −1−1 1

1 01 2

.2

Answer. Q =

12 − 1√

6

−12

1√6

12 012

23

, R =

[

2 0

0√

6

]

.3

d. A =

1 0 0

−2 1 02 0 1

.4

Answer. Q =

13

23√

5− 2√

5

−23

√5

3 023

43√

51√5

, R =

3 −23

23

0√

53

43√

5

0 0 1√5

.5

e. A =

1 1 −1−1 0 −1

−1 −1 11 2 −1

.6

Answer. Q =

12 0 −1

2−1

21√2

−12

−12 0 1

212

1√2

12

, R =

2 2 −1

0√

2 −√

2

0 0 1

.7

5. Let Q be an orthogonal matrix.8

a. Show that QT is orthogonal.9

b. Show that an orthogonal matrix has orthonormal rows.10

c. Show that Q−1 is orthogonal.11

Page 145: Lectures on Linear Algebra Philip Korman

5.3. GRAM-SCHMIDT ORTHOGONALIZATION 145

6. Fill in the missing entries of the following 3× 3 orthogonal matrix1

Q =

cos θ − sin θ ∗sin θ cos θ ∗∗ ∗ ∗

.

7. a. If an orthogonal matrix Q has a real eigenvalue λ show that λ = ±1.2

Hint. If Qx = λx, then λ2x · x = Qx · Qx = x · QT Qx.3

b. Give an example of an orthogonal matrix without real eigenvalues.4

c. Describe all orthogonal matrices that are upper triangular.5

8. The matrix

−1 1 1

1 −1 11 1 −1

has eigenvalues λ1 = λ2 = −2, λ3 = 1.6

Find an orthonormal basis of the eigenspace corresponding to λ1 = λ2 = −2.7

8

9. For the factorization A = QR assume that w1, w2, w3 are the columns of9

A, and u1, u2, u3 are the columns of Q. Show that10

R =

w1 · u1 w2 · u1 w3 · u1

0 w2 · u2 w3 · u2

0 0 w3 · u3

.

10. a. Let A be non-singular n×n matrix, with linearly independent columns11

a1, a2, . . . , an. Justify Hadamard’s inequality12

| detA| ≤ ||a1||||a2|| · · · ||an|| .

Hint. Consider the A = QR decomposition, where Q is an orthogonal13

matrix with the orthonormal columns q1, q2, . . . , qn, and rij are the entries14

of R. Then aj = r1jq1 + r2jq2 + · · ·+ rjjqj . By the Pythagorean theorem15

||aj||2 = r21j + r2

2j + · · ·+ r2jj ≥ r2

jj, so that |rjj| ≤ ||aj||. It follows that16

| detA| = | detQ| | detR| = 1 · (|r11| |r22| · · · |rnn|) ≤ ||a1||||a2|| · · · ||an|| .

b. Give geometrical interpretation of Hadamard’s inequality in case of three17

vectors a1, a2, a3 in R3.18

Hint. In that case the matrix A is of size 3×3, and | detA| gives the volume19

of the parallelepiped spanned by the vectors a1, a2, a3 (by a property of triple20

products from Calculus), while the right hand side of Hadamard’s inequality21

gives the volume of the rectangular parallelepiped (a box) with edges of the22

same length.23

Page 146: Lectures on Linear Algebra Philip Korman

146 CHAPTER 5. ORTHOGONALITY AND SYMMETRY

5.4 Linear Transformations1

Suppose A is an m × n matrix, and x are vectors in Rn. Then the product2

Ax defines a transformation of vectors x ∈ Rn into the vectors Ax ∈ Rm.3

Transformations often have geometrical significance as the following exam-4

ples show.5

Let x =

[

x1

x2

]

be any vector in R2. If A =

[

1 00 0

]

, then Ax =6

[

x1

0

]

, giving the projection of x on the x1-axis. For B =

[

1 00 −1

]

,7

Bx =

[

x1

−x2

]

, providing the reflection of of x across the x1-axis. If C =8

[

−2 00 −2

]

, then Cx =

[

−2x1

−2x2

]

, so that x is transformed into a vector9

of the opposite direction, which is also stretched in length by a factor of 2.10

Suppose that we have a transformation (a function) taking each vector x11

in Rn into a unique vector T (x) in Rm, with common notation T (x) : Rn →12

Rm. We say that T (x) is a linear transformation if for any vectors u and v13

in Rn and any scalar c14

(i) T (cu) = cT (u) (T is homogeneous)15

(ii) T (u + v) = T (u) + T (v). (T is additive)16

The property (ii) holds true for arbitrary number of vectors, as follows by17

applying it to two vectors at a time. Taking c = 0 in (i), we see that18

T (0) = 0 for any linear transformation. It follows that in case T (0) 6= 019

the transformation T (x) is not linear. For example, the transformation20

T (x) : R3 → R2 given by T

x1

x2

x3

=

[

2x1 − x2

x1 + x2 + 1

]

is not linear,21

because T

0

00

=

[

01

]

, not equal to the zero vector.22

If A is any m×n matrix, and x ∈ Rn, then Ax is a linear transformation23

from Rn to Rm, since the properties (i) and (ii) clearly hold. The 2 × 224

matrices A, B and C above provided examples of linear transformations25

from R2 to R2.26

Page 147: Lectures on Linear Algebra Philip Korman

5.4. LINEAR TRANSFORMATIONS 147

It turns out that any linear transformation T (x) : Rn → Rm can be1

represented by a matrix. Indeed, let e1 =

10...0

, e2 =

01...0

, . . . , en =2

00...

1

be the standard basis of Rn. Any x =

x1

x2...

xn

in Rn can be writen3

as4

x = x1e1 + x2e2 + · · ·+ xnen .

We assume that the vectors T (x) ∈ Rm are also represented through their5

coordinates with respect to the standard basis in Rm. By linearity of the6

transformation T (x)7

(4.1) T (x) = x1T (e1) + x2T (e2) + · · ·+ xnT (en) .

Form the m × n matrix A = [ T (e1) T (e2) . . . T (en) ], by using the vectors8

T (ei)’s as its columns. Then (4.1) implies that9

T (x) = Ax ,

by the definition of the product of matrices. One says that A is the matrix10

of the linear transformation T (x).11

Example 1 Let T (x) : R2 → R2 be the rotation of any vector x ∈ R2 by12

the angle θ counterclockwise. Clearly, this transformation is linear (it does13

not matter if you stretch a vector by a factor of c and then rotate the result,14

or if the same vector is rotated first, and then is stretched). The standard15

basis in R2 is e1 =

[

10

]

, e2 =

[

01

]

. T (e1) is the rotation of e1, which is a16

unit vector at the angle θ with the x1-axis, so that T (e1) =

[

cos θsin θ

]

. T (e2)17

is the vector in the second quarter at the angle θ with the x2-axis, so that18

T (e2) =

[

− sin θ

cos θ

]

. Then19

A = [ T (e1) T (e2) ] =

[

cos θ − sin θsin θ cos θ

]

,

Page 148: Lectures on Linear Algebra Philip Korman

148 CHAPTER 5. ORTHOGONALITY AND SYMMETRY

the rotation matrix. Observe that this matrix is orthogonal. It follows1

T (x) = Ax, so that rotation can be performed through matrix multiplica-2

tion. If x =

[

x1

x2

]

, then the vector3

[

cos θ − sin θ

sin θ cos θ

] [

x1

x2

]

is the rotation of x by the angle θ counterclockwise. If we take θ = π2 , then4

A =

[

0 −1

1 0

]

, and5

[

0 −11 0

] [

x1

x2

]

=

[

−x2

x1

]

is the rotation of x =

[

x1

x2

]

by the angle π2 counterclockwise.6

Matrix representation of a linear transformation depends on the basis7

used. For example, consider a new basis of R2, {e2, e1}, obtained by changing8

the order of elements in the standard basis. Then the rotation matrix in the9

new basis is10

B = [ T (e2) T (e1) ] =

[

− sin θ cos θcos θ sin θ

]

.

Example 2 Let T (x) : R3 → R3 be the rotation of any vector x =

x1

x2

x3

11

around the x3-axis by the angle θ counterclockwise.12

It is straightforward to verify that T (x) is a linear transformation. Let13

e1, e2, e3 be the standard basis in R3. Similarly to the Example 1, T (e1) =14

cos θsin θ

0

, T (e2) =

− sin θcos θ

0

, because for vectors lying in the x1x2-plane15

T (x) is just a rotation in that plane. Clearly, T (e3) = e3 =

0

01

. Then16

the matrix of this transformation is17

A =

cos θ − sin θ 0

sin θ cos θ 00 0 1

.

Page 149: Lectures on Linear Algebra Philip Korman

5.4. LINEAR TRANSFORMATIONS 149

Again, we obtained an orthogonal matrix.1

Sometimes one can find the matrix of a linear transformation T (x) with-2

out evaluating T (x) on the elements of a basis. For example, fix a vector3

a ∈ Rn and define T (x) = Proj ax, the projection of any vector x ∈ Rn on4

a. Recall that Proj ax = x·a||a||2 a, which we can rewrite as5

(4.2) Proj ax = aa · x||a||2 =

a aT x

||a||2 =a aT

||a||2 x .

Define an n×n matrix P = a aT

||a||2 , the projection matrix. Then Proj ax = Px.6

7

Example 3 Let a =

1

11

∈ R3. Then the matrix that projects on the8

line through a is9

P =1

3

1

11

[

1 1 1]

=1

3

1 1 1

1 1 11 1 1

.

We say that a linear transformation T (x) : Rn → Rn has an eigenvector10

x, corresponding to the eigenvalue λ if11

T (x) = λx , x 6= 0 .

Theorem 5.4.1 Vector x is an eigenvector of T (x) if and only if it is an12

eigenvector of the corresponding matrix representation A. The corresponding13

eigenvalues are the same.14

Proof: Follows immediately from the relation T (x) = Ax. ♦15

For the Example 2, the vector e3 is an eigenvector for both T (x) and A,16

corresponding to λ = 1.17

Suppose that we have a linear transformation T1(x) : Rn → Rm with the18

corresponding m×n matrix A, and a linear transformation T2(x) : Rm → Rk19

with the corresponding k×m matrix B, so that T1(x) = Ax and T2(x) = Bx.20

It is straightforward to show that the composition T2 (T1(x)) is a linear21

transformation. We have22

T2 (T1(x)) = BT1(x) = BAx ,

so that the k×n product matrix BA corresponds to the composition T2 (T1(x)).23

24

Page 150: Lectures on Linear Algebra Philip Korman

150 CHAPTER 5. ORTHOGONALITY AND SYMMETRY

Exercises1

1. Is the following map T (x) : R2 → R3 a linear transformation? In case it2

is a linear transformation write down its matrix A.3

a. T

([

x1

x2

])

=

2x1 − x2

x1 + x2 + 1

3x1

.4

Answer. No, T (0) 6= 0.5

b. T

([

x1

x2

])

=

2x1 − x2

x1 + x2

0

.6

Answer. Yes, T (x) is both homogeneous and additive. A =

2 −11 1

0 0

.7

c. T

([

x1

x2

])

=

−5x2

2x1 + x2

3x1 − 3x2

.8

Answer. Yes. A =

0 −52 1

3 −3

.9

d. T

([

x1

x2

])

=

2x1 − x2

x1

3

.10

Answer. No.11

e. T

([

x1

x2

])

=

ax1 + bx2

cx1 + dx2

ex1 + fx2

. Here a, b, c, d, e, f are arbitrary scalars.12

Answer. Yes. A =

a bc de f

.13

f. T

([

x1

x2

])

=

x1x2

00

.14

Answer. No.15

Page 151: Lectures on Linear Algebra Philip Korman

5.4. LINEAR TRANSFORMATIONS 151

2. Determine the matrices of the following linear transformations.1

a. T

x1

x2

x3

x4

=

x4

x3

x2

x1

. Answer. A =

0 0 0 10 0 1 0

0 1 0 01 0 0 0

.2

b. T

x1

x2

x3

x4

=

x1 − 2x3 − x4

−x1 + 5x2 + x3 − 2x4

5x2 + 2x3 − 4x4

. Answer. A =

1 0 −2 −1−1 5 1 −2

0 5 2 −4

.3

4

c. T

x1

x2

x3

=

x1 + x2 − 2x3

−2x1 + 3x2 + x3

0

2x1 + 6x2 − 2x3

. Answer. A =

1 1 −2

−2 3 10 0 0

2 6 −2

.5

6

d. T

x1

x2

x3

= 7x1 + 3x2 − 2x3 . Answer. A =[

7 3 −2]

.7

e. T (x) projects x ∈ R3 onto the x1x2-plane, then reflects the result with8

respect to the origin, and finally doubles the length.9

Answer. A =

−2 0 0

0 −2 00 0 0

.10

f. T (x) rotates the projection of x ∈ R3 onto the x1x2-plane by the angle θ11

counterclockwise, while it triples the projection of x on the x3-axis.12

Answer. A =

cos θ − sin θ 0

sin θ cos θ 00 0 3

.13

g. T (x) reflects x ∈ R3 with respect to the x1x3 plane and then doubles the14

length.15

Answer. A =

2 0 00 −2 0

0 0 2

.16

h. T (x) projects x ∈ R4 onto the subspace spanned by a =

1−1

1−1

.17

Page 152: Lectures on Linear Algebra Philip Korman

152 CHAPTER 5. ORTHOGONALITY AND SYMMETRY

Hint. Use (4.2).1

3. Show that the composition of two linear transformations is a linear trans-2

formation.3

Hint. T2 (T1(x1 + x2)) = T2 (T1(x1) + T1(x2)) = T2 (T1(x1)) + T2 (T1(x2)).4

4. A linear transformation T (u) : Rn → Rm is said to be one-to-one if5

T (u1) = T (u2) implies that u1 = u2.6

a. Show that T (u) is one-to-one if and only if T (u) = 0 implies that u = 0.7

b. Assume that n > m. Show that T (u) cannot be one-to-one.8

Hint. Represent T (u) = Au with an m × n matrix A. The system Au = 09

has non-trivial solutions.10

5. A linear transformation T (x) : Rn → Rm is said to be onto if for every11

y ∈ Rm there is x ∈ Rn such that y = T (x). (So that Rm is the range of12

T (x).)13

a. Let A be the matrix of T (x). Show that T (x) is onto if and only if14

rankA = m.15

b. Assume that m > n. Show that T (x) cannot be onto.16

6. Assume that a linear transformation T (x) : Rn → Rn has an invertible17

matrix A.18

a. Show that T (x) is both one-to-one and onto.19

b. Show that for any y ∈ Rn the equation T (x) = y has a unique solution20

x ∈ Rn. The map y → x is called the inverse transformation, and is denoted21

by x = T−1(y).22

c. Show that T−1(y) is a linear transformation.23

7. A linear transformation T (x) : R3 → R3 projects vector x on

12

−1

.24

a. Is it one-to-one? (Or is it “many-to-one”?)25

b. Is it onto?26

c. Determine the matrix A of this transformation. Hint. Use (4.2).27

d. Calculate N (A) and C(A), and relate them to parts a and b.28

Page 153: Lectures on Linear Algebra Philip Korman

5.5. SYMMETRIC TRANSFORMATIONS 153

5.5 Symmetric Transformations1

A square matrix A is called symmetric if AT = A. If aij denote the entries2

of A, then symmetric matrices satisfy3

aij = aji , for all i and j .

(Symmetric off-diagonal elements are equal, while the diagonal elements4

are not restricted.) For example, the matrix A =

1 3 −4

3 −1 0−4 0 0

is5

symmetric.6

Symmetric matrices have a number of nice properties. For example,7

(5.1) Ax · y = x · Ay .

Indeed,8

Ax · y = x · AT y = x · Ay .

Theorem 5.5.1 All eigenvalues of a symmetric matrix A are real, and9

eigenvectors corresponding to different eigenvalues are orthogonal.10

Proof: Let us prove the orthogonality part first. Let x and λ be an11

eigenvector-eigenvalue pair, so that12

(5.2) Ax = λx .

Let y and µ be another such pair:13

(5.3) Ay = µy ,

and assume that λ 6= µ. Take inner product of both sides of (5.2) with y:14

(5.4) Ax · y = λ x · y .

Similarly, take the inner product of x with both sides of (5.3):15

(5.5) x · Ay = µ x · y .

From (5.4) subtract (5.5), and use (2.1)16

0 = (λ − µ) x · y .

Page 154: Lectures on Linear Algebra Philip Korman

154 CHAPTER 5. ORTHOGONALITY AND SYMMETRY

Since λ−µ 6= 0, it follows that x ·y = 0, proving that x and y are orthogonal.1

2

Turning to all eigenvalues being real, assume that on the contrary λ =3

a+ib, with b 6= 0, is a complex eigenvalue and z =

z1

z2...

zn

is a corresponding4

eigenvector with complex valued entries. By the Theorem 4.2.2, λ = a − ib5

is a different eigenvalue, and z =

z1

z2...

zn

is a correponding eigenvector. We6

just proved that z · z = 0. In components7

z · z = z1z1 + z2z2 + · · ·+ znzn = |z1|2 + |z2|2 + · · ·+ |zn|2 = 0 .

But then z1 = z2 = · · · = zn = 0, so that z is the zero vector. We have a8

contradiction, because an eigenvector cannot be the zero vector. It follows9

that all eigenvalues are real. ♦10

For the rest of this section W will denote a subspace of Rn. Let T (x) :11

Rn → Rn be a linear transformation. We say that W is an invariant subspace12

of T (x) if T (x) ∈ W , for any x ∈ W . In other words, T (x) : W → W maps13

W into itself.14

A linear transformation T (x) : W → W is called self-adjoint if15

T (x) · y = x · T (y) , for all x, y ∈ W .

Using matrix representation T (x) = Ax, relative to some basis w1, w2, . . . , wp16

of W , we can write this definition as17

(5.6) Ax · y = x · Ay = AT x · y , for all x, y ∈ Rp .

If A is symmetric, so that A = AT , then (5.6) holds, and T (x) is self-18

adjoint. Conversely, if T (x) is self-adjoint, then (5.6) holds. Taking x = ei19

and y = ej , this gives (A)ij =(

AT)

ij, so that A = AT , and A is symmetric.20

(The coordinates of x with respect to the basis w1, w2, . . . , wp of W are21

given by the vector ei, which has the component i equal to one, and all22

other components equal to zero.) We conclude that a linear transformation23

T (x) is self-adjoint if and only if its matrix A is symmetric.24

Page 155: Lectures on Linear Algebra Philip Korman

5.5. SYMMETRIC TRANSFORMATIONS 155

Theorem 5.5.2 A self-adjoint transformation T (x) : W → W has at least1

one eigenvector x ∈ W .2

Proof: Let A be a matrix representation of T (x), which is symmetric3

by the above remarks. Eigenvalues of A are the roots of its characteristic4

equation, which by the fundamental theorem of algebra must have a least5

one root. Since A is symmetric that root is real, and the corresponding6

eigenvector has real entries. By Theorem 5.4.1, T (x) has the same eigenvec-7

tor. ♦8

9

The following theorem describes one of the central facts of Linear Alge-10

bra.11

Theorem 5.5.3 Any symmetric n × n matrix A has a complete set of n12

mutually orthogonal eigenvectors.13

Proof: Consider the self-adjoint transformation T (x) = Ax : Rn → Rn.14

By the preceding theorem T (x) has an eigenvector, which we denote f1, and15

let λ1 be the corresponding eigenvalue. By Theorem 5.4.1, Af1 = λ1f1.16

Consider the (n − 1)-dimensional subspace W = f⊥1 , consisting of x ∈ Rn

17

such that x · f1 = 0 (W is the orthogonal complement of f1). We claim that18

for such x, T (x) · f1 = 0, so that T (x) ∈ W , and W is an invariant subspace19

of T (x). Indeed,20

T (x) · f1 = Ax · f1 = x · Af1 = λ1x · f1 = 0 .

We now restrict T (x) to the subspace W , T (x) : W → W . By the preced-21

ing theorem T (x) has an eigenvector f2 on W , and by construction f2 is22

orthogonal to f1. Then we restrict T (x) to the (n−2)-dimensional subspace23

W1 = f⊥2 , the orthogonal complement of f2 in W . Similarly to the above,24

one shows that W1 is an invariant subspace of T (x), so that T (x) has an25

eigenvector f3 ∈ W1, which by construction is orthogonal to both f1 and26

f2. Continuing this process, we obtain an orthogonal set of eigenvectors27

f1, f2, . . . , fn of T (x), which by Theorem 5.4.1 are eigenvectors of A too. ♦28

29

Was it necessary to replace the matrix A by its “abstract” version T (x)?30

Yes. Any matrix representation of T (x) on W is of size (n − 1) × (n − 1),31

and definitely is not equal to A. The above process does not work for A.32

Since symmetric matrices have a complete set of eigenvectors they are33

diagonalizable.34

Page 156: Lectures on Linear Algebra Philip Korman

156 CHAPTER 5. ORTHOGONALITY AND SYMMETRY

Theorem 5.5.4 Let A be a symmetric matrix. There is an orthogonal ma-1

trix P so that2

(5.7) P−1AP = D .

The entries of the diagonal matrix D are the eigenvalues of A, while the3

columns of P are the corresponding eigenvectors.4

Proof: By the preceding theorem, A has a complete orthogonal set of5

eigenvectors. Normalize these eigenvectors of A, and use them as columns6

of the diagonalizing matrix P . The columns of P are orthonormal, so that7

P is an orthogonal matrix. ♦8

Recall that one can rewrite (5.7) as A = PDP−1. Since P is orthogonal,9

P−1 = PT , and both of these relations can be further rewritten as PT AP =10

D, and A = PDPT .11

Example The matrix A =

[

0 −2

−2 3

]

is symmetric. It has an eigen-12

value λ1 = 4 with the corresponding normalized eigenvector 1√5

[

−1

2

]

,13

and an eigenvalue λ2 = −1 with the corresponding normalized eigenvector14

1√5

[

2

1

]

, Then P = 1√5

[

−1 2

2 1

]

is the orthogonal diagonalizing matrix.15

A calculation shows that P−1 = 1√5

[

−1 2

2 1

]

(this is a very rare example16

of a matrix equal to its inverse). The formula (5.7) becomes17

1√5

[

−1 2

2 1

] [

0 −2

−2 3

]

1√5

[

−1 2

2 1

]

=

[

4 0

0 −1

]

.

18

A symmetric matrix A is called positive definite if all of its eigenvalues19

are positive.20

Theorem 5.5.5 A symmetric matrix A is positive definite if and only if21

(5.8) Ax · x > 0 , for all x 6= 0 .

Proof: If A is positive definite, then A = PDPT , where the matrix P is22

orthogonal, and the diagonal matrix D =

λ1 0 . . . 0

0 λ2 . . . 0...

......

0 0 . . . λn

has positive23

Page 157: Lectures on Linear Algebra Philip Korman

5.5. SYMMETRIC TRANSFORMATIONS 157

diagonal entries. For any x 6= 0, consider the vector y = PT x, y =

y1

y2...

yn

.1

Then2

Ax ·x = PDPT x ·x = DPT x ·PT x = Dy ·y = λ1y21 +λ2y

22 + · · ·+λny2

n > 0 .

(Observe that y 6= 0, for otherwise PT x = 0, or P−1x = 0, and then3

x = P 0 = 0, a contradiction.)4

Conversely, assume that (5.8) holds, while λ and x 6= 0 is an eigenvalue-5

eigenvector pair:6

Ax = λx .

Taking the inner product of both sides with x, gives Ax · x = λ||x||2, so7

that λ =Ax · x||x||2 > 0, proving that all eigenvalues are positive, so that A is8

positive definite. ♦9

The formula (5.8) provides an alternative definition of positive definite10

matrices, which is often more convenient to use.11

Write a positive definite matrix A in the form12

A = PDPT = P

λ1 0 . . . 0

0 λ2 . . . 0...

......

0 0 . . . λn

PT .

One can define the square root of A as follows13

√A = P

√λ1 0 . . . 00

√λ2 . . . 0

......

...

0 0 . . .√

λn

PT ,

using that all eigenvalues are positive. It follows that(√

A)2

= A, by14

squaring the diagonal entries.15

If A is any non-singular n × n matrix (not necessarily symmetric), then16

the matrix ATA is positive definite. Indeed,(

AT A)T

= AT(

AT)T

= AT A,17

so that this matrix is symmetric, and for any vector x 6= 018

AT Ax · x = Ax ·(

AT)T

x = Ax ·Ax = ||Ax||2 > 0 ,

Page 158: Lectures on Linear Algebra Philip Korman

158 CHAPTER 5. ORTHOGONALITY AND SYMMETRY

because Ax 6= 0 (if Ax = 0, then x = A−10 = 0, contrary to x 6= 0). By the1

Theorem 5.5.5, the matrix AT A is positive definite.2

Exercises3

1. Given an arbitrary square matrix A show that the matrices A + AT and4

AAT are symmetric. If A is non-singular, show that AAT is positive definite.5

6

2. Given an arbitrary square matrix A and a symmetric B show that AT BA7

is symmetric.8

3. Explain why both the determinant and the trace of a positive definite9

matrix are positive.10

4. Write the matrix A in the form A = PDPT with orthogonal P and11

diagonal D. Determine if A is positive definite (p.d.).12

a. A =

[

0 11 0

]

. Answer. P = 1√2

[

−1 11 1

]

, D =

[

−1 00 1

]

, not p.d.13

14

b. A =

[

−1 22 2

]

. Answer. P = 1√5

[

−2 11 2

]

, D =

[

−2 00 3

]

.15

c. A =

0 2 0

2 0 00 0 5

.16

Answer. P =

− 1√2

1√2

01√2

1√2

0

0 0 1

, D =

−2 0 0

0 2 00 0 5

, not p.d.17

d. A =

2 −1 1−1 2 −1

1 −1 2

.18

Answer. P =

1√3

− 1√2

1√2

− 1√3

0 1√2

1√3

1√2

0

, D =

4 0 00 1 0

0 0 1

, p.d.19

5. Let an n × n matrix A be skew-symmetric, so that AT = −A.20

a. Show that each eigenvalue is either zero or purely imaginary number.21

Page 159: Lectures on Linear Algebra Philip Korman

5.5. SYMMETRIC TRANSFORMATIONS 159

Hint. If Ax = λx and λ is real, then x ·x > 0 and λx ·x = Ax ·x = x ·AT x =1

−x ·Ax = −λx ·x, so that λ = 0. If Az = λz and λ is complex, then Az = λz2

and z · z > 0. Obtain λz · z = Az · z = z · AT z = −z ·Az = −λz · z, so that3

λ = −λ.4

b. If n is odd show that one of the eigenvalues is zero.5

Hint. What is |A|?6

c. Show that the matrix I + A is non-singular.7

Hint. What are the eigenvalues of this matrix?8

d. Show that the matrix (I − A)(I + A)−1 is orthogonal.9

6. Given an arbitrary square matrix A show that the matrix AT A + I is10

positive definite.11

7. Assume that a matrix A is symmetric and invertible. Show that A−1 is12

symmetric.13

8. Let14

(5.9) A = λ1u1uT1 + λ2u2u

T2 + · · ·+ λnunuT

n ,

where the vectors u1, u2, . . . , un ∈ Rn form an orthonormal set, and λ1, λ2, . . . , λn15

are real numbers, not necessarily different.16

a. Show that A is an n × n symmetric matrix.17

b. Show that u1, u2, . . . , un ∈ Rn are the eigenvectors of A, and λ1, λ2, . . . , λn18

are the corresponding eigenvalues of A.19

c. For any x ∈ Rn show that20

Ax = λ1Proju1x + λ2Proju2

x + · · ·+ λnProjunx .

(The formula (5.9) is known as the spectral decomposition of A, and the21

eigenvalues λ1, λ2, . . . , λn are often called the spectrum of A.)22

9. a. Determine if A =

−5 −1 1 1

−1 2 −1 01 −1 2 7

1 0 7 8

is positive definite.23

Hint. Let x = e1, then Ax · x = −5.24

b. Show that all diagonal entries of a positive definite matrix are positive.25

Page 160: Lectures on Linear Algebra Philip Korman

160 CHAPTER 5. ORTHOGONALITY AND SYMMETRY

Hint. 0 < Aek · ek = akk.1

10. Assume that a matrix A is positive definite, and S is a non-singular2

matrix of the same size. Show that the matrix STAS is positive definite.3

11. Let A = [aij] and U = [uij] be positive n × n definite matrices. Show4

thatn

i,j=1

aijuij > 0.5

Hint. Diagonalize A = PDP−1, where the entries of the diagonal ma-6

trix D are the positive eigenvalues λ1, λ2, . . . , λn of A. Let V = PUP−1.7

The matrix V = [vij] is positive definite, and hence its diagonal entries8

are positive, vii > 0. Since similar matrices have the same trace, ob-9

tain:

n∑

i,j=1

aijuij = tr (AU) = tr(

PAUP−1)

= tr(

PAP−1 PUP−1)

=10

tr (DV ) = λ1v11 + λ2v22 + · · ·+ λnvnn > 0.11

5.6 Quadratic Forms12

All terms of the function f(x1, x2) = x21 − 3x1x2 + 5x2

2 are quadratic in its13

variables x1 and x2, giving an example of a quadratic form. If x =

[

x1

x2

]

14

and A =

[

1 −32

−32 5

]

, it is easy to verify that15

f(x1, x2) = Ax · x .

This symmetric matrix A is called the matrix of the quadratic form f(x1, x2).16

The quadratic form g(x1, x2) = x21 + 5x2

2 involves only the sum of squares.17

Its matrix is diagonal

[

1 00 5

]

. Such quadratic forms are easier to analyze.18

For example, the equation19

x21 + 5x2

2 = 1

defines an ellipse in the x1x2-plane, with the principal axes going along the20

x1 and x2 axes. We shall see in this section that the graph of21

x21 − 3x1x2 + 5x2

2 = 1

is also an ellipse, with rotated principal axes.22

Page 161: Lectures on Linear Algebra Philip Korman

5.6. QUADRATIC FORMS 161

In general, given a symmetric n × n matrix A and x =

x1

x2...

xn

, one1

defines the quadratic form with the matrix A as Ax · x. The sum

n∑

j=1

aijxj2

gives the component i of Ax, and then3

Ax · x =

n∑

i=1

xi

n∑

j=1

aijxj =

n∑

i=1

n∑

j=1

aijxixj .

This sum is equal ton

j=1

n∑

i=1

aijxixj, and one often writes Ax·x =n

i,j=1

aijxixj,4

meaning double summation in any order. If a quadratic form includes a term5

k xixj, with coefficient k, then its matrix A has the entries aij = aji = k2 .6

A quadratic form is called positive definite if its matrix A is positive7

definite, which implies that Ax · x > 0 for all x ∈ Rn.8

Example 1 Consider the quadratic form9

Ax · x = x21 + 2x2

2 + 3x23 − 2x1x2 + 2x2x3 ,

where

x1

x2

x3

∈ R3. The matrix of this form is A =

1 −1 0−1 2 1

0 1 3

. To10

see if A is positive definite, let us calculate its eigenvalues. Expanding the11

characteristic polynomial |A − λI | in the first row, gives the characteristic12

equation13

λ3 − 6λ2 + 9λ − 2 = 0 .

Guessing a root, λ1 = 2, allows one to factor the characteristic equation:14

(λ − 2)(

λ2 − 4λ + 1)

= 0 ,

so that λ2 = 2−√

3 and λ3 = 2+√

3. All eigenvalues are positive, therefore15

A is positive definite. By Theorem 5.5.5, Ax · x > 0 for all x 6= 0, which is16

the same as saying17

x21 + 2x2

2 + 3x23 − 2x1x2 + 2x2x3 > 0 ,

for all x1, x2, x3, except when x1 = x2 = x3 = 0.18

Page 162: Lectures on Linear Algebra Philip Korman

162 CHAPTER 5. ORTHOGONALITY AND SYMMETRY

For a diagonal matrix1

(6.1) D =

λ1 0 . . . 00 λ2 . . . 0...

... . . ....

0 0 . . . λn

the corresponding quadratic form2

Dx · x = λ1x21 + λ2x

22 + · · ·+ λnx2

n .

is a sum of squares. In fact, a quadratic form is a sum of squares if and only3

if its matrix is diagonal.4

Using an invertible n × n matrix S, it is often advantageous to make a5

change of variables x = Sy in the quadratic form Ax · x. The old variables6

x1, x2, . . . , xn are replaced by the new variables y1, y2, . . . , yn. (One can7

express the new variables through the old ones by a transformation y =8

S−1x.) The quadratic form changes as follows9

(6.2) Ax · x = ASy · Sy = STASy · y

The matrices STAS and A are called congruent. They represent the same10

quadratic form in different variables.11

Recall that for any symmetric matrix A one can find an orthogonal12

matrix P , so that P−1AP = D, where D is the diagonal matrix in (6.1).13

The entries of D are the eigenvalues of A, and the columns of P are the14

eigenvectors of A. Let now x = Py. Because P is an orthogonal matrix,15

PT = P−1, and then using (6.2)16

Ax · x = PT APy · y = P−1APy · y = Dy · y = λ1y21 + λ2y

22 + · · ·+ λny2

n .

It follows that any quadratic form can be reduced to a sum of squares by an17

orthogonal change of variables. In other words, any quadratic form can be18

diagonalized.19

Example 2 Let us return to the quadratic form x21 − 3x1x2 + 5x2

2, with20

the matrix A =

[

1 −32

−32 5

]

. One calculates that A has an eigenvalue21

λ1 = 112 with the corresponding normalized eigenvector 1√

10

[

−13

]

, and an22

Page 163: Lectures on Linear Algebra Philip Korman

5.6. QUADRATIC FORMS 163

eigenvalue λ2 = 12 with the corresponding normalized eigenvector 1√

10

[

3

1

]

,1

Then P = 1√10

[

−1 33 1

]

is the orthogonal diagonalizing matrix. Write the2

change of variables x = Py in components as3

x1 = 1√10

(−y1 + 3y2)(6.3)

x2 = 1√10

(3y1 + y2) .

Substituting these expressions into the quadratic form x21−3x1x2+5x2

2, and4

simplifying, obtain5

x21 − 3x1x2 + 5x2

2 =11

2y21 +

1

2y22 ,

so that the quadratic form is a sum of squares in the new coordinates.6

We can now identify the curve7

(6.4) x21 − 3x1x2 + 5x2

2 = 1

as an ellipse, because in the y1,y2 coordinates8

(6.5)11

2y21 +

1

2y22 = 1

is clearly an ellipse. The principal axes of the ellipse (6.5) are y1 = 0 and9

y2 = 0. Corresponding to y2 = 0 (or the y1 axis), obtain from (6.3)10

x1 = − 1√10

y1(6.6)

x2 = 3 1√10

y1 ,

a principal axis for (6.4), which is a line through the origin in the x1x211

plane parallel to the vector 1√10

[

−13

]

(one of the eigenvectors of A), with12

y1 serving as a parameter on this line. This principal axis can also be13

written in the form x2 = −3x1, making it easy to plot in the x1x2-plane.14

Similarly, the line x2 = 13x1 through the other eigenvector of A gives the15

second principal axis (it is obtained by setting y2 = 0 in (6.3)). Observe16

that the principal axes are perpendicular (orthogonal) to each other, as the17

eigenvectors of a symmetric matrix.18

Page 164: Lectures on Linear Algebra Philip Korman

164 CHAPTER 5. ORTHOGONALITY AND SYMMETRY

Example 3 Let us diagonalize the quadratic form −x21−3x1x2+3x2

2, with1

the matrix B =

[

−1 −32

−32 3

]

. The matrix B has the same eigenvectors as2

the matrix A in the Example 2 (observe that B = A − 2I). Hence the3

diagonalizing matrix P is the same, and we use the same change of variable4

(6.3) to obtain5

−x21 − 3x1x2 + 3x2

2 =7

2y21 − 3

2y22 .

The equation6

7

2y21 − 3

2y22 = 1

gives a hyperbola in the y1y2 plane (y2 = ±√

73y2

1 − 23). It follows that the7

curve8

−x21 − 3x1x2 + 3x2

2 = 1

is also a hyperbola, with the principal axes x2 = −3x1 and x2 = 13x1.9

Simultaneous Diagonalization10

Suppose that we have two quadratic forms Ax · x and Bx · x, with x ∈ Rn.11

Each form can be diagonalized, or reduced to a sum of square terms. Can12

one diagonalize both forms simultaneously, or by using the same non-singular13

change of variables x = Sy?14

Theorem 5.6.1 Two quadratic forms can be simultaneously diagonalized,15

provided that one of them is positive definite.16

Proof: Assume that A is a positive definite matrix. By a change of17

variables x = S1y (where S1 is an orthogonal matrix), we can diagonalize18

the corresponding quadratic form:19

Ax · x = λ1y21 + λ2y

22 + · · ·+ λny2

n .

Since A is positive definite, its eigenvalues λ1, λ2, . . . , λn are positive. We20

now make a further change of variables y1 = 1√λ1

z1, y2 = 1√λ2

z2, . . . , yn =21

1√λn

zn, or in matrix form y = S2z, where22

S2 =

1√λ1

0 . . . 0

0 1√λ2

. . . 0...

... . . ....

0 0 . . . 1√λn

,

Page 165: Lectures on Linear Algebra Philip Korman

5.6. QUADRATIC FORMS 165

a diagonal matrix. Then1

(6.7) Ax · x = z21 + z2

2 + · · ·+ z2n = z · z .

Denote S = S1S2. The change of variables we used to achieve (6.7) is2

x = S1y = S1S2z = Sz.3

By the same change of variables x = Sz, the second quadratic form4

Bx · x is transformed to a new form STBSz · z. Let us now diagonalize5

this new form by the change of variables z = Pu, where P is an orthogonal6

matrix. With the second quadratic form now diagonalized, let us see what7

happens to the first form after the last change of variables. By a property8

of orthogonal matrices9

Ax · x = z · z = Pu · Pu = u · u = u21 + u2

2 + · · ·+ u2n ,

so that the first form is also diagonalized. (The change of variables that10

diagonalized both quadratic forms is x = Sz = SPu = S1S2Pu.) ♦11

The Law of Inertia12

Recall that diagonalizationof a quadratic forms Ax·x has the form∑n

i=1 λiy2i ,13

where λi’s are the eigenvalues of the n×n matrix A. The number of positive14

eigenvalues of A determines the number of positive terms in the diagonal-15

ization. A non-singular change of variables x = Sz transforms the quadratic16

forms Ax · x into STASz · z, with a congruent matrix STAS. The diagonal-17

ization of STAS will be different from that of Ax · x, however the number18

of positive and negative terms will be the same. This fact is known as the19

law of inertia, and it is justified next.20

Theorem 5.6.2 If |S| 6= 0, then the matrix STAS has the same number of21

positive eigenvalues, and the same number of negative eigenvalues as A.22

Proof: The idea of the proof is to gradually transform S to an orthogonal23

matrix Q, taken from the decomposition S = QR. When S = Q, STAS =24

QT AQ = Q−1AQ, a matrix similar to A, with the same eigenvalues.25

Assume first that |A| 6= 0, so that A has no zero eigenvalues. Write26

down S = QR decomposition. Observe that |R| 6= 0 (because |Q||R| =27

|S| 6= 0), and hence all diagonal entries of the upper triangular matrix R28

are positive. Consider two families of matrices S(t) = Q [(1− t)I + tR] and29

F (t) = ST (t)AS(t) depending on a parameter t, with 0 ≤ t ≤ 1. When30

Page 166: Lectures on Linear Algebra Philip Korman

166 CHAPTER 5. ORTHOGONALITY AND SYMMETRY

t = 0, S(0) = Q and then F (0) = QT (t)AQ(t) = Q−1(t)AQ(t), which is1

a matrix similar to A, and hence F (0) has the same eigenvalues as A, and2

in particular the same number of positive eigenvalues as A. Observe that3

|S(t)| 6= 0, because |Q| = ±1, while the matrix (1 − t)I + tR is an upper4

triangular matrix with positive diagonal entries, and hence its determinant is5

positive. It follows that |F (t)| 6= 0. As t varies from 0 to 1, the eigenvalues of6

F (t) change continuously. These eigenvalues cannot touch (or cross) zero,7

since zero eigenvalue would imply |F (t)| = 0, which is not possible. It8

follows that the number of positive eigenvalues of F (t) remains the same.9

But F (1) = STAS, since S(1) = S. We conclude that the matrices A and10

STAS have the same number of positive eigenvalues. The same argument11

shows that the matrices A and STAS have the same number of negative12

eigenvalues.13

Assume now that |A| = 0, which implies that A has zero eigenvalue(s).14

If ε > 0 is small enough, then the matrix A+ εI has no zero eigenvalue, and15

it has the same number of positive eigenvalues as A, which by above is the16

same as the number of positive eigenvalues of ST (A + εI)S, which in turn17

is the same as the number of positive eigenvalues of STAS (decreasing ε, if18

necessary). ♦19

Exercises20

1. Given a matrix A, write down the corresponding quadratic form Ax · x.21

a. A =

[

2 −1−1 −3

]

. Answer. 2x21 − 2x1x2 − 3x2

2.22

b. A =

[

−1 32

32 0

]

. Answer. −x21 + 3x1x2.23

c. A =

0 −32 −3

−32 1 2

−3 2 −2

. Answer. x22 − 3x1x2 − 6x1x3 + 4x2x3 − 2x2

3.24

2. Find the matrix A of the following quadratic forms.25

a. 2x21 − 6x1x2 + 5x2

2. Answer. A =

[

2 −3

−3 5

]

.26

b. −x1x2 − 4x22. Answer. A =

[

0 −12

−12 −4

]

.27

Page 167: Lectures on Linear Algebra Philip Korman

5.6. QUADRATIC FORMS 167

c. 3x21 − 2x1x2 + 8x2x3 + x2

2 − 5x23. Answer. A =

3 −1 0

−1 1 40 4 −5

.1

d. 3x1x2 − 6x1x3 + 4x2x3. Answer. A =

0 32 −3

32 0 2

−3 2 0

.2

e. −x21 + 4x2

2 + 2x23 − 5x1x2 − 4x1x3 + 4x2x3 − 8x3x4.3

Answer. A =

−1 −52 −2 0

−52 4 2 0

−2 2 2 −40 0 −4 0

.4

3. Let A be a 20 × 20 matrix with aij = i + j.5

a. Show that A is symmetric.6

b. In the quadratic form Ax · x find the coefficient of the x3x8 term.7

Answer. 22.8

c. How many terms can the form Ax · x contain? Answer. 20·212 = 210.9

4. Diagonalize the following quadratic forms.10

a. 3x21 + 2x1x2 + 3x2

2.11

Answer. P = 1√2

[

−1 11 1

]

, the change of variables x = Py gives 2y21 +4y2

2 .12

13

b. −4x1x2 + 3x22.14

Answer. P = 1√5

[

2 −11 2

]

, obtain −y21 + 4y2

2 .15

c. 3x21 + x2

2 − 2x23 + 4x2x3.16

Answer. P =

1 0 0

0 − 1√5

2√5

0 2√5

1√5

, the change of variables x1 = y1, x2 =17

− 1√5y2 + 2√

5y3, x3 = 2√

5y2 + 1√

5y3 produces 3y2

1 − 3y22 + 2y2

3.18

d. −x21 − x2

2 − x23 + 2x1x2 + 2x1x3 + 2x2x3.19

Page 168: Lectures on Linear Algebra Philip Korman

168 CHAPTER 5. ORTHOGONALITY AND SYMMETRY

Answer. The orthogonal P =

− 1√2

− 1√6

1√3

0 2√6

1√3

1√2

− 1√6

1√3

, the change of variables1

x1 = − 1√2y1 − 1√

6y2 + 1√

3y3, x2 = 2√

6y2 + 1√

3y3, x3 = 1√

2y1 − 1√

6y2 + 1√

3y32

produces −2y21 − 2y2

2 + y23 .3

5. Consider congruent matrices A and STAS, with |S| 6= 0. Assume that A4

has zero eigenvalue. Show that ST AS also has zero eigenvalue of the same5

multiplicity as A.6

Hint. By the law of inertia, the matrices STAS and A have the same number7

of positive eigenvalues, and the same number of negative eigenvalues.8

6. a. Let A be a 3×3 symmetric matrix with the eigenvalues λ1 > 0, λ2 > 0,9

and λ3 = 0. Show that Ax · x ≥ 0 for all x ∈ R3. Show also that there is a10

vector x0 ∈ R3 such that Ax0 · x0 = 0.11

Hint. If P is the orthogonal diagonalizing matrix for A, and x = Py, then12

Ax · x = λ1y21 + λ2y

22 ≥ 0. Let y = e3, the coordinate vector, and x0 = Pe3.13

Then Ax0 · x0 = 0.14

b. A symmetric n×n matrix is called positive semi-definite if Ax ·x ≥ 0 for15

all x ∈ Rn. Show that a symmetric matrix A is positive semi-definite if and16

only if all eigenvalues of A are non-negative.17

c. A symmetric n × n matrix is called negative semi-definite if Ax · x ≤ 018

for all x ∈ Rn. Show that a symmetric matrix A is negative semi-definite if19

and only if all eigenvalues of A are non-positive.20

5.7 Vector Spaces21

Vectors in Rn can be added, and multiplied by scalars. There are other22

mathematical objects that can be added and multiplied by numbers (scalars),23

for example matrices or functions. We shall refer to such objects as vectors,24

belonging to abstract vector spaces, provided that the operations of addition25

and scalar multiplication satisfy the familiar properties of vectors in Rn.26

Definition A vector space V is a collection of objects called vectors, which27

may be added together and multiplied by numbers. So that for any x, y ∈ V28

and any number c, one has x + y ∈ V and c x ∈ V . Moreover, addition and29

scalar multiplication are required to satisfy the following rules, also called30

Page 169: Lectures on Linear Algebra Philip Korman

5.7. VECTOR SPACES 169

axioms (which hold for all vectors x, y, z ∈ V and any numbers c, c1, c2):1

x + y = y + x ,

x + (y + z) = (x + y) + z ,

there is a unique “zero vector”, denoted 0, such that x + 0 = x ,

there is a unique vector −x such that x + (−x) = 0 ,

1x = x ,

(c1c2) x = c1 (c2x) ,

c (x + y) = cx + cy ,

(c1 + c2) x = c1x + c2x .

Any subspace in Rn provides an example of a vector space. In particular,2

any plane through the origin in R3 is a vector space. Other examples of3

vector spaces involve matrices and polynomials.4

Example 1 Two by two matrices can be added and multiplied by scalars,5

and the above axioms are clearly satisfied, so that 2 × 2 matrices form6

a vector space, denoted by M2×2. The role of zero vector is played by7

the zero matrix O =

[

0 00 0

]

. A standard basis for M2×2 is provided8

by the matrices E11 =

[

1 0

0 0

]

, E12 =

[

0 1

0 0

]

, E21 =

[

0 0

1 0

]

, and9

E22 =

[

0 0

0 1

]

, so that the vector space M2×2 is four-dimensional. Given10

an arbitrary A =

[

a11 a12

a21 a22

]

∈ M2×2 one can decompose11

A = a11E11 + a12E12 + a21E21 + a22E22 ,

so that a11, a12, a21, a22 are the coordinates of A with respect to the standard12

basis.13

One defines similarly the the vector space Mm×n of m×n matrices. The14

dimension of Mm×n is mn.15

Example 2 One checks that the above axioms apply for polynomials of16

power n of the form anxn +an−1xn−1 + · · ·+a2x

2 +a1x+a0, with numerical17

coefficients a0, a1, a2, . . . , an. Hence, these polynomials form a vector space,18

denoted by Pn. Particular polynomials are regarded as vectors in Pn. The19

Page 170: Lectures on Linear Algebra Philip Korman

170 CHAPTER 5. ORTHOGONALITY AND SYMMETRY

vectors 1, x, x2, . . . , xn form a standard basis of Pn, so that Pn is an (n + 1)-1

dimensional vector space.2

Example 3 The vector space Pn(−1, 1) consists of polynomials of power3

n, which are considered only on the interval x ∈ (−1, 1). What is the4

advantage of restricting polynomials to an interval? We can now define the5

notion of an inner product. Given two vectors p(x), q(x) ∈ Pn(−1, 1) define6

their inner product as7

p(x) · q(x) =

∫ 1

−1p(x)q(x) dx .

If p(x) · q(x) = 0, we say that the polynomials are orthogonal. The norm8

(or the “magnitude”) ||p(x)|| of the vector p(x) is defined by the relation9

||p(x)||2 = p(x) · p(x), so that ||p(x)|| =√

p(x) · p(x). For example, the10

vectors p(x) = x and q(x) = x2 are orthogonal, because11

p(x) · q(x) =

∫ 1

−1x3 dx = 0 .

Calculate12

||1||2 = 1 · 1 =

∫ 1

−1

1 dx = 2 ,

so that the norm of the vector p(x) = 1 is ||1|| =√

2.13

The standard basis 1, x, x2, . . . , xn of Pn(−1, 1) is not orthogonal. While14

the vectors 1 and x are orthogonal, the vectors 1 and x2 are not. We now15

apply the Gram-Schmidt process to produce an orthogonal basis16

p0(x), p1(x), p2(x), . . . , pn(x), but instead of normalization it is customary17

to standardize the polynomials by requiring that pi(1) = 1 for all i.18

We set p0(x) = 1. Since the second element x of the standard basis is19

orthogonal to p0(x), we take p1(x) = x. (Observe that p0(x) and p1(x) are20

already standardized.) According to the Gram-Schmidt process calculate21

x2 − x2 · 11 · 1 1 − x2 · x

x · x x = x2 − 1

3.

Multiply this polynomial by 32 , to obtain p2(x) = 1

2

(

3x2 − 1)

, with p2(1) =22

1. The next step of the Gram-Schmidt process involves23

x3 − x3 · 11 · 1 1 − x3 · x

x · x x − x3 · p2(x)

p2(x) · p2(x)p2(x) = x3 − 3

5x .

Page 171: Lectures on Linear Algebra Philip Korman

5.7. VECTOR SPACES 171

Multiply this polynomial by 52 , to obtain p3(x) = 1

2

(

5x3 − 3x)

, with p3(1) =1

1, and so on. The orthogonal polynomials p0(x), p1(x), p2(x), p3(x), . . . are2

known as the Legendre polynomials.3

Next, we discuss linear transformations and their matrices. Let V1, V2 be4

two vector spaces. We say that a map T : V1 → V2 is a linear transformation5

if for any x, x1, x2 ∈ V1 and any number c6

T (cx) = cT (x)

T (x1 + x2) = T (x1) + T (x2) .

Clearly the second of these properties applies to any number of terms. Let-7

ting c = 0, we conclude that any linear transformation satisfies T (0) = 0.8

In case T (0) 6= 0, the map is not linear. For example, the map T : M2×2 →9

M2×2 given by T (A) = 3A − I is not a linear transformation, because10

T (O) = −I 6= O.11

Example 4 Let D : P4 → P3 be a transformation taking any polynomial12

p(x) = a4x4 + a3x

3 + a2x2 + a1x + a0 into13

D (p(x)) = 4a4x3 + 3a3x

2 + 2a2x + a1 .

Clearly, D is just differentiation, and so that this transformation is linear.14

Let T (x) be a linear transformation T : V1 → V2. Assume that B1 =15

{w1, w2, . . . , wp} is a basis of V1, and B2 = {z1, z2, . . . , zs} is a basis of V2.16

Any vector x ∈ V1 can be written as17

x = x1w1 + x2w2 + · · ·+ xpwp ,

with the coordinates [x]B1 =

x1

x2...

xp

. We show next that the coordinate18

vectors [x]B1 and [T (x)]B2 ∈ Rs are related by a matrix multiplication. By19

the linearity of the transformation T (x)20

T (x) = x1T (e1) + x2T (e2) + · · ·+ xpT (ep) .

In coordinates21

(7.1) [T (x)]B2 = x1[T (e1)]B2 + x2[T (e2)]B2 + · · ·+ xp[T (ep)]B2 .

Page 172: Lectures on Linear Algebra Philip Korman

172 CHAPTER 5. ORTHOGONALITY AND SYMMETRY

Form a matrix A = [ [T (e1)]B2 [T (e2)]B2 . . . [T (ep)]B2 ], of size s × p, by1

using the vectors [T (ei)]B2 as its columns. Then (7.1) implies that2

T (x) = Ax ,

by the definition of matrix multiplication. One says that A is the matrix of3

the linear transformation T (x).4

Example 5 Let us return to differentiation D : P4 → P3, and use the5

standard bases B1 = {1, x, x2, x3, x4} of P4, and B2 = {1, x, x2, x3} of P3.6

Since7

D(1) = 0 = 0 × 1 + 0 × x + 0 × x2 + 0× x3 ,

obtain the coordinates [D(1)]B2 =

00

00

. Similarly,8

D(x) = 1 = 1 × 1 + 0 × x + 0 × x2 + 0 × x3 ,

giving [D(x)]B2 =

1

00

0

. Then D(x2) = 2x, giving [D(x2)]B2 =

0

20

0

,9

D(x3) = 3x2, [D(x3)]B2 =

0

03

0

, D(x4) = 4x3, [D(x4)]B2 =

0

00

4

. The10

matrix of the transformation D is then11

A =

0 1 0 0 0

0 0 2 0 00 0 0 3 0

0 0 0 0 4

.

The matrix A allows one to perform differentiation of polynomials in P412

through matrix multiplication. For example, let p(x) = −2x4 + x3 + 5x− 6,13

with p′(x) = −8x3+3x2 +5. Then [p(x)]B1 =

−6

50

1−2

, [p′(x)]B2 =

50

3−8

,14

Page 173: Lectures on Linear Algebra Philip Korman

5.7. VECTOR SPACES 173

and one verifies that1

50

3−8

=

0 1 0 0 00 0 2 0 0

0 0 0 3 00 0 0 0 4

−65

01

−2

.

The matrix A transforms the coefficients of p(x) into those of p′(x).2

Exercises3

1. Write down the standard basis S in M2×3, and then find the coordinates4

of A =

[

1 −3 2

−5 0 4

]

with respect to this basis.5

Answer. E11 =

[

1 0 0

0 0 0

]

, E12 =

[

0 1 0

0 0 0

]

, etc.; [A]S =

1

−32

−50

4

.6

2. a. Show that the matrices A1 =

[

1 00 0

]

, A2 =

[

1 20 0

]

and A3 =7

[

1 23 0

]

are linearly independent vectors of M2×2.8

b. Let D =

[

3 43 0

]

. Show that the matrices A1, A2, A3, D are linearly9

dependent vectors of M2×2.10

Hint. Express D as a linear combination of A1, A2, A3.11

c. Let A4 =

[

0 0

0 1

]

. Show that B = {A1, A2, A3, A4} is a basis of M2×2.12

d. F =

[

3 4

0 −7

]

. Find the coordinates of F with respect to the basis B.13

Answer. [F ]B =

12

0−7

.14

Page 174: Lectures on Linear Algebra Philip Korman

174 CHAPTER 5. ORTHOGONALITY AND SYMMETRY

3. Calculate the norm of the following vectors in P2(−1, 1).1

a. x. Hint. ||x||2 = x · x =∫ 1−1 x2 dx.2

b. p(x) = x2 − 1. Answer. ||x2 − 1|| = 4√15

.3

c. q(x) =√

2. Answer. ||√

2|| = 2.4

4. Apply the Gram-Schmidt process to the vectors 1, x+2, x2−x of P2(−1, 1)5

to obtain a standardized orthogonal basis of P2(−1, 1).6

5. Let I : P3 → P4 be a map taking any polynomial p(x) = a3x3 + a2x

2 +7

a1x + a0 into I (p(x)) = a3x4

4 + a2x3

3 + a1x2

2 + a0x.8

a. Identify I with a calculus operation, and explain why I is a linear trans-9

formation.10

b. Find the matrix representation of I (using the standard bases in both P311

and P4).12

Answer.

0 0 0 01 0 0 0

0 1/2 0 00 0 1/3 00 0 0 1/4

.13

6. Let T : M2×2 → M2×2 be a map taking matrices A =

[

a bc d

]

into14

T (A) =

[

2c 2da b

]

.15

a. Show that T is a linear transformation.16

b. Find the matrix representation of T (using the standard bases).17

Answer.

0 0 2 0

0 0 0 21 0 0 00 1 0 0

.18

7. Let T : M2×2 → M2×2 be a map taking matrices A =

[

a bc d

]

into19

T (A) =

[

c a1 b

]

. Show that T is not a linear transformation.20

Hint. Consider T (O).21

Page 175: Lectures on Linear Algebra Philip Korman

5.7. VECTOR SPACES 175

8. Justify Rodrigues’ formula for Legendre polynomials1

Pn(x) =1

2nn!

dn

dxn

[(

x2 − 1)n]

.

Hint. Differentiations produce a polynomial of degree n, with Pn(0) = 1.2

To see that∫ 1−1 Pn(x)Pm(x) dx = 0, with n < m, perform m integrations by3

parts, shifting all derivatives on Pn(x).4

Page 176: Lectures on Linear Algebra Philip Korman

Chapter 61

Systems of Differential2

Equations3

Solving of systems of differential equations provides one of the most useful4

applications of eigenvectors and eigenvalues. Generalized eigenvectors are5

studied in the process. For simplicity, the presentation involves 3×3 systems,6

and then the general theory is indicated.7

6.1 Linear Systems with Constant Coefficients8

We wish to find the functions x1(t), x2(t) and x3(t) that solve a system of9

differential equations, with given numerical coefficients a11, . . . , a33,10

x′1 = a11x1 + a12x2 + a13x3(1.1)

x′2 = a21x1 + a22x2 + a23x3

x′3 = a31x1 + a32x2 + a33x3 ,

subject to the initial conditions11

x1(t0) = α, x2(t0) = β, x3(t0) = γ ,

with given numbers t0, α, β and γ. Using matrix notation we may write12

this system as13

(1.2) x′ = Ax, x(t0) = x0 ,

176

Page 177: Lectures on Linear Algebra Philip Korman

6.1. LINEAR SYSTEMS WITH CONSTANT COEFFICIENTS 177

where x(t) =

x1(t)

x2(t)x3(t)

is the unknown vector function, A =

a11 a12 a13

a21 a22 a23

a31 a32 a33

1

is the 3 × 3 matrix of the coefficients, and x0 =

αβ

γ

is the vector of ini-2

tial conditions. Indeed, on the left side in (1.1) we have components of the3

vector x′(t) =

x′1(t)

x′2(t)

x′3(t)

, while the components of the vector function Ax4

are on the right.5

If two vector functions y(t) and z(t) are solutions of the system x′ = Ax,6

their linear combination c1y(t)+c2z(t) is also a solution of the same system,7

for any constants c1 and c2, a fact known as the superposition principle, a8

property of linear systems. It is known that the initial value problem (1.2)9

has a unique solution x(t), valid for all t ∈ (−∞,∞).10

Let us search for a solution of (1.2) in the form11

(1.3) x(t) = eλtξ ,

with a scalar λ, and a vector ξ with entries independent of t. Substitution12

of x(t) into (1.2) gives13

λeλtξ = A(

eλtξ)

,

simplifying to14

Aξ = λξ .

So that if λ is an eigenvalue of A, and ξ the corresponding eigenvector, then15

(1.3) provides a solution of the problem (1.2). (Observe that the same is true16

in case of any square n×n matrix A.) Let λ1, λ2 and λ3 be the eigenvalues17

of our 3 × 3 matrix A. There are several cases to consider.18

Case 1 The eigenvalues of A are real and distinct. Then the corresponding19

eigenvectors ξ1, ξ2 and ξ3 are linearly independent by the Theorem 4.2.1.20

Since eλ1tξ1, eλ2tξ2 and eλ3tξ3 are solutions of the system (1.2), their linear21

combination22

(1.4) x(t) = c1eλ1tξ1 + c2e

λ2tξ2 + c3eλ3tξ3

also solves the system (1.2). We claim that (1.4) gives the general solution23

of the system (1.2), meaning that it is possible to choose the constants c1,24

Page 178: Lectures on Linear Algebra Philip Korman

178 CHAPTER 6. SYSTEMS OF DIFFERENTIAL EQUATIONS

c2, and c3 to satisfy any initial conditions:1

(1.5) x(t0) = c1eλ1t0ξ1 + c2e

λ2t0ξ2 + c3eλ3t0ξ3 = x0 .

Obtain a system of three linear equations with three unknowns c1, c2,2

and c3. The matrix of this system is non-singular, because its columns3

eλ1t0ξ1, eλ2t0ξ2, e

λ3t0ξ3 are linearly independent. Therefore, we can find a4

unique solution triple c1, c2, c3 of the system (1.5). Then x(t) = c1eλ1tξ1 +5

c2eλ2tξ2 + c3e

λ3tξ3 gives the solution of the initial value problem (1.2).6

Example 1 Solve the system7

x′ =

2 1 11 2 1

0 0 4

x, x(0) =

−22

−1

.

8

Calculate the eigenvalue λ1 = 1, with the corresponding eigenvector ξ1 =9

−1

10

, λ2 = 3, with the corresponding eigenvector ξ2 =

1

10

, and λ3 =10

4, with the corresponding eigenvector ξ3 =

11

1

. The general solution is11

then12

x(t) = c1et

−1

10

+ c2e3t

1

10

+ c3e4t

1

11

,

or in components13

x1(t) = −c1et + c2e

3t + c3e4t

x2(t) = c1et + c2e

3t + c3e4t

x3(t) = c3e4t .

Turning to the initial conditions,14

x1(0) = −c1 + c2 + c3 = −2

x2(0) = c1 + c2 + c3 = 2

x3(0) = c3 = −1 .

Calculate c1 = 2, c2 = 1 and c3 = −1. Answer:15

x1(t) = −2et + e3t − e4t

x2(t) = 2et + e3t − e4t

x3(t) = −e4t .

Page 179: Lectures on Linear Algebra Philip Korman

6.1. LINEAR SYSTEMS WITH CONSTANT COEFFICIENTS 179

Case 2 The eigenvalue λ1 is double, so that λ2 = λ1, while λ3 6= λ1, and1

assume that λ1 has two linearly independent eigenvectors ξ1 and ξ2. Let2

ξ3 denote an eigenvector corresponding to λ3. This vector does not lie in3

the plane spanned by ξ1 and ξ2, and then the vectors ξ1, ξ2, ξ3 are linearly4

independent. The general solution is given by the formula (1.4), with λ25

replaced by λ1:6

x(t) = c1eλ1tξ1 + c2e

λ1tξ2 + c3eλ3tξ3 .

To satisfy the initial conditions, obtain a linear system for c1, c2 and c37

c1eλ1t0ξ1 + c2e

λ1t0ξ2 + c3eλ3t0ξ3 = x0 ,

which has a unique solution for any x0, because its matrix has linearly8

independent columns. (Linear independence of eigenvectors is the key here!)9

10

Example 2 Solve the system11

x′ =

2 1 1

1 2 11 1 2

x , x(0) =

1

0−4

.

Expanding the determinant of A−λI in the first row, write the characteristic12

equation as13

(2− λ)[

(2 − λ)2 − 1]

− (2− λ − 1) + 1 + λ − 2 = 0 ,

14

(2 − λ)(1− λ)(3− λ)− 2(1 − λ) = 0 ,15

(1 − λ) [(2 − λ)(3− λ) − 2] = 0 .

The roots are: λ1 = 1, λ2 = 1, λ3 = 4. A calculation shows that the16

double eigenvalue λ1 = 1 has two linearly independent eigenvectors ξ1 =17

−101

and ξ2 =

0−1

1

. The other eigenvalue λ3 = 4 comes with the18

corresponding eigenvector ξ3 =

11

1

. The general solution is then19

x(t) = c1et

−1

01

+ c2et

0

−11

+ c3e4t

1

11

.

Page 180: Lectures on Linear Algebra Philip Korman

180 CHAPTER 6. SYSTEMS OF DIFFERENTIAL EQUATIONS

In components,1

x1(t) = −c1et + c3e

4t

x2(t) = −c2et + c3e

4t

x3(t) = c1et + c2e

t + c3e4t .

Using the initial conditions, calculate c1 = −2, c2 = −1, and c3 = −1.2

Answer:3

x1(t) = 2et − e4t

x2(t) = et − e4t

x3(t) = −3et − e4t .

Proceeding similarly, we can solve the initial value problem (1.2) for any4

n×n matrix A, provided that all of its eigenvalues are real, and it has a full5

set of n linearly independent eigenvectors. Recall that if an n× n matrix A6

is symmetric (aij = aji, for all i and j), then all of its eigenvalues are real.7

The eigenvalues of a symmetric matrix may be repeated, but there is always8

a full set of n linearly independent eigenvectors. So that one can solve the9

initial value problem (1.2) for any system with a symmetric matrix.10

Case 3 The eigenvalue λ1 has multiplicity two (λ1 is a double root of the11

characteristic equation, λ2 = λ1), λ3 6= λ1, but λ1 has only one linearly12

independent eigenvector ξ. The eigenvalue λ1 brings in only one solution13

eλ1tξ. By analogy with the second order equations, one can try teλ1tξ for14

the second solution. However, this vector function is a scalar multiple of the15

first solution, so that it is linearly dependent with it, at any t = t0. Modify16

the guess:17

(1.6) x(t) = teλ1tξ + eλ1tη ,

and choose a constant vector η, to obtain a second linearly independent18

solution of (1.2). Substituting (1.6) into (1.2), and using that Aξ = λ1ξ,19

obtain20

eλ1tξ + λ1teλ1tξ + λ1e

λ1tη = λ1teλ1tξ + eλ1tAη.

Cancelling a pair of terms, and dividing by eλ1t, gives21

(1.7) (A − λ1I)η = ξ .

Even though the matrix A − λ1I is singular (its determinant is zero), it22

can be shown (using the Jordan normal forms) that the linear system (1.7)23

Page 181: Lectures on Linear Algebra Philip Korman

6.1. LINEAR SYSTEMS WITH CONSTANT COEFFICIENTS 181

always has a solution η, called generalized eigenvector. We see from (1.7)1

that η is not a multiple of ξ. Using this vector η in (1.6), gives us the second2

linearly independent solution, corresponding to λ = λ1.3

Example 3 Solve the system4

x′ =

[

1 −1

1 3

]

x .

This matrix has a double eigenvalue λ1 = λ2 = 2, and only one linearly5

independent eigenvector ξ =

[

1

−1

]

, giving only one solution: x1(t) =6

e2t

[

1

−1

]

. The system (1.7) to determine the generalized eigenvector η =7

[

η1

η2

]

takes the form8

−η1 − η2 = 1

η1 + η2 = −1 .

Discard the second equation, because it is a multiple of the first one. The9

first equation has infinitely many solutions, but all we need is just one so-10

lution, that is not a multiple of ξ. Set η2 = 0, which gives η1 = −1. We11

produced a second linearly independent solution:12

x2(t) = te2t

[

1−1

]

+ e2t

[

−10

]

.

The general solution is then13

x(t) = c1e2t

[

1

−1

]

+ c2

(

te2t

[

1

−1

]

+ e2t

[

−1

0

])

.

Example 4 Let us solve the system14

x′ =

1 4 0−4 −7 0

0 0 5

x .

This matrix has a double eigenvalue λ1 = λ2 = −3, with only one linearly15

independent eigenvector ξ1 =

−1

10

, giving only one solution: x1(t) =16

Page 182: Lectures on Linear Algebra Philip Korman

182 CHAPTER 6. SYSTEMS OF DIFFERENTIAL EQUATIONS

e−3t

−1

10

. The system (1.7) to determine the generalized eigenvector1

η =

η1

η2

η3

takes the form (A − 3I)η = ξ1, or in components2

4η1 + 4η2 = 1

−4η1 − 4η2 = −1

8η3 = 0 .

Obtain η3 = 0. Then set η2 = 0, so that η1 = −14 . The second linearly3

independent solution is4

x2(t) = e−3t

t

−110

+

−1400

.

The third eigenvalue λ3 = 5 is simple, with the corresponding eigenvector5

00

1

, so that x3(t) = e5t

00

1

. The general solution is then6

x(t) = c1e−3t

−11

0

+ c2e−3t

t

−11

0

+

−140

0

+ c3e5t

00

1

.

For larger matrices A one can have repeated eigenvalues of multiplicity7

greater than two. We shall cover such a possibility later on.8

Exercises9

1. Find the general solution for the following systems of differential equa-10

tions.11

a. x′(t) =

[

3 4−1 −2

]

x(t).12

Answer. x(t) = c1e−t

[

−1

1

]

+ c2e2t

[

−4

1

]

.13

b. x′(t) =

[

4 −2−2 1

]

x(t).14

Page 183: Lectures on Linear Algebra Philip Korman

6.1. LINEAR SYSTEMS WITH CONSTANT COEFFICIENTS 183

Answer. x(t) = c1e5t

[

−2

1

]

+ c2

[

1

2

]

.1

c. x′(t) =

[

1 2−1 4

]

x(t).2

Answer. x(t) = c1e2t

[

2

1

]

+ c2e3t

[

1

1

]

.3

d. x′(t) =

1 1 12 2 1

4 −2 1

x(t).4

Answer. x(t) = c1e−t

−10

2

+ c2e2t

−1−3

2

+ c3e3t

12

0

.5

e. x′(t) =

1 1 −12 0 −1

0 −2 1

x(t).6

Answer. x(t) = c1e−t

01

1

+ c2e3t

−1−1

1

+ c3

11

2

.7

f. x′(t) =

0 1 0 01 0 0 0

0 0 4 −50 0 1 −2

x(t).8

Answer. x(t) = c1e−t

00

11

+ c2e−t

−11

00

+ c3et

11

00

+ c4e3t

00

51

.9

g. x′(t) =

2 1 1

1 2 11 1 2

x(t).10

Answer. x(t) = c1e4t

1

11

+ c2et

−1

01

+ c3et

−1

10

.11

2. Solve the following initial value problems.12

Page 184: Lectures on Linear Algebra Philip Korman

184 CHAPTER 6. SYSTEMS OF DIFFERENTIAL EQUATIONS

a. x′(t) =

[

1 2

4 3

]

x(t), x(0) =

[

1

−2

]

.1

Answer. x1(t) =4e−t

3− e5t

3, x2(t) = −4e−t

3− 2e5t

3.2

b. x′(t) =

1 −1 1

2 1 23 0 3

x(t), x(0) =

0

−11

.3

Answer. x1(t) = −1 + e2t, x2(t) = −4e2t + 3e3t, x3(t) = 1 − 3e2t + 3e3t.4

3. Given a vector function x(t) =

x1(t)

x2(t)x3(t)

define its derivative as x′(t) =5

limh→0x(t+h)−x(t)

h. Show that x′(t) =

x′1(t)

x′2(t)

x′3(t)

.6

4. Solve7

a. x′(t) =

[

1 −1

4 −3

]

x(t).8

b.9 x′1 = x1 − x2 , x1(0) = 1

x′2 = 4x1 − 3x2 , x2(0) = −1 .

Answer. x1(t) = e−t (3t + 1), x2(t) = e−t (6t − 1).10

c. x′(t) =

0 −1 12 −3 1

1 −1 −1

x(t).11

Answer. x(t) = c1e−t

1

10

+ c2e−t

t

1

10

+

1

11

+ c3e−2t

0

11

.12

6.2 A Pair of Complex Conjugate Eigenvalues13

Complex Valued and Real Valued Solutions14

Recall that one differentiates complex valued functions similarly to the real15

ones. For example,16

d

dteit = ieit ,

Page 185: Lectures on Linear Algebra Philip Korman

6.2. A PAIR OF COMPLEX CONJUGATE EIGENVALUES 185

where i =√−1 is treated the same way as any other constant. Any complex1

valued function x(t) can be written in the form x(t) = u(t)+iv(t), where u(t)2

and v(t) are real valued functions. It follows by the definition of derivative3

that x′(t) = u′(t) + iv′(t). For example, using Euler’s formula,4

d

dteit =

d

dt(cos t + i sin t) = − sin t + i cos t = i(cos t + i sin t) = ieit .

If the system5

(2.1) x′ = Ax

has a complex valued solution x(t) = u(t) + iv(t), then6

u′(t) + iv′(t) = A (u(t) + iv(t)) .

Equating the real and imaginary parts, obtain u′ = Au and v′ = Av, so that7

both u(t) and v(t) are real valued solutions of the system (2.1).8

The General Solution9

Assume that the matrix A has a pair of complex conjugate eigenvalues p+iq10

and p−iq. They need to contribute two linearly independent solutions. The11

eigenvector corresponding to p + iq is complex valued, which we may write12

as ξ + iη, where ξ and η are real valued vectors (ξ − iη is the eigenvector13

corresonding to p − iq). Then x(t) = e(p+iq)t(ξ + iη) is a solution of our14

system. To get two real valued solutions, we take the real and the imaginary15

parts of this solution. Obtain:16

x(t) = ept(cos qt + i sin qt)(ξ + iη)

= ept(cos qt ξ − sin qt η) + iept(sin qt ξ + cos qt η) .

So that17

u(t) = ept(cos qt ξ − sin qt η) ,18

v(t) = ept(sin qt ξ + cos qt η)

give us two real valued solutions. In case of a 2 × 2 matrix (when there are19

no other eigenvalues), the general solution is20

(2.2) x(t) = c1u(t) + c2v(t) .

(If one applies the same procedure to the other eigenvalue p − iq, and the21

corresponding eigenvector ξ−iη, the answer is the same.) We claim that u(t)22

Page 186: Lectures on Linear Algebra Philip Korman

186 CHAPTER 6. SYSTEMS OF DIFFERENTIAL EQUATIONS

and v(t) are linearly independent. Indeed, if on the contrary these vectors1

were proportional, the same would be true for ξ + iη and ξ − iη, which are2

eigenvectors corresponding to two different eigenvalues p + iq and p − iq, a3

contradiction. It follows that it is possible to choose the constants c1 and4

c2 to satisfy any initial condition x(t0) = x0.5

Example 1 Solve the system6

x′ =

[

1 −22 1

]

x, x(0) =

[

21

]

.

Calculate the eigenvalues λ1 = 1 + 2i and λ2 = 1 − 2i. The eigenvector7

corresponding to λ1 is

[

i

1

]

. So that there is a complex valued solution8

e(1+2i)t

[

i1

]

. Using Euler’s formula, rewrite this solution as9

et(cos 2t + i sin2t)

[

i1

]

= et

[

− sin 2tcos 2t

]

+ iet

[

cos 2tsin 2t

]

.

Taking the real and imaginary parts obtain two linearly independent solu-10

tions, so that the general solution is11

x(t) = c1et

[

− sin 2tcos 2t

]

+ c2et

[

cos 2tsin 2t

]

.

In components12

x1(t) = −c1et sin 2t + c2e

t cos 2t

x2(t) = c1et cos 2t + c2e

t sin 2t .

From the initial conditions13

x1(0) = c2 = 2

x2(0) = c1 = 1 ,

so that c1 = 1, and c2 = 2. Answer:14

x1(t) = −et sin 2t + 2et cos 2t

x2(t) = et cos 2t + 2et sin 2t .

Example 2 Solve the system15

x′ =

2 −1 2

1 0 2−2 1 −1

x .

Page 187: Lectures on Linear Algebra Philip Korman

6.2. A PAIR OF COMPLEX CONJUGATE EIGENVALUES 187

1

One of the eigenvalues is λ1 = 1, with an eigenvector

0

21

. Then et

0

21

2

gives a solution. The other two eigenvalues are λ2 = i and λ3 = −i. The3

eigenvector corresponding to λ2 = i is

−1 − i

−1 − i1

, giving a complex valued4

solution eit

−1 − i−1 − i

1

, that can be rewriten as5

(cos t + i sin t)

−1 − i

−1 − i1

=

− cos t + sin t

− cos t + sin tcos t

+ i

− cos t − sin t

− cos t − sin tsin t

Taking the real and imaginary parts gives us two more linearly independent6

solutions, so that the general solution is7

x(t) = c1et

02

1

+ c2

− cos t + sin t− cos t + sin t

cos t

+ c3

− cos t − sin t− cos t − sin t

sin t

.

Exercises8

1. Solve the following systems.9

a. x′ =

[

1 −1

1 1

]

x.10

Answer. x(t) = c1et

[

cos t

sin t

]

+ c2et

[

− sin t

cos t

]

.11

b.12 x′1 = 3x1 + 5x2 , x1(0) = −1

x′2 = −5x1 − 3x2 , x2(0) = 2 .

Answer. x1(t) =7

4sin 4t − cos 4t, x2(t) = 2 cos 4t − 1

4sin 4t.13

c. x′ =

−1 −1 1−1 0 2

−2 −1 2

x, x(0) =

3−1

1

.14

Page 188: Lectures on Linear Algebra Philip Korman

188 CHAPTER 6. SYSTEMS OF DIFFERENTIAL EQUATIONS

Answer. x1(t) = et − 2 sin t + 2 cos t, x2(t) = −3et + 2 sin t + 2 cos t, x3(t) =1

−et − 2 sin t + 2 cos t.2

d. x′ =

2 −1 −31 1 4

2 −1 −3

x, x(0) =

00

4

.3

Answer. x1(t) = cos 2t−6 sin 2t−1, x2(t) = 11 cos 2t+8 sin 2t−11, x3(t) =4

cos 2t − 6 sin 2t + 3.5

6.3 The Exponential of a Matrix6

In matrix notation, a linear system with a square matrix A,7

(3.1) x′ = Ax, x(0) = x0

looks like a single equation. In case A and x0 are scalars, the solution of8

(3.1) is9

(3.2) x(t) = eAtx0 .

In order to write the solution of our system in the form (3.2), we shall define10

the notion of the exponential of a matrix. First, recall powers of an n × n11

matrix: A2 = A · A, A3 = A2 · A, and so on. Starting with the Maclauren12

series13

ex = 1 + x +x2

2!+

x3

3!+

x4

4!+ · · · =

∞∑

n=0

xn

n!,

we define (I is the identity matrix)14

(3.3) eA = I + A +A2

2!+

A3

3!+

A4

4!+ · · · =

∞∑

n=0

An

n!.

So that eA is the sum of infinitely many matrices, and each entry of eA is an15

infinite series. We shall justify later on that all of these series are convergent16

for any matrix A, so that one can compute eA for any square matrix A. If17

O denotes a square matrix with all entries equal to zero, then eO = I .18

Applying the formula (3.3) to the matrix At gives19

eAt = I + At +A2t2

2!+

A3t3

3!+

A4t4

4!+ · · · ,

Page 189: Lectures on Linear Algebra Philip Korman

6.3. THE EXPONENTIAL OF A MATRIX 189

and then differentiating term by term obtain1

d

dteAt = A + A2t +

A3t2

2!+

A4t3

3!+ · · · = AeAt .

We conclude by a direct substitution that the formula (3.2) gives the solution2

of the initial-value problem (3.1). (Observe that x(0) = eOx0 = x0.)3

Example 1 Let A =

[

a 00 b

]

, where a and b are given numbers. Then4

An =

[

an 00 bn

]

, and therefore5

eA =

[

1 + a + a2

2! + a3

3! + · · · 0

0 1 + b + b2

2! + b3

3! + · · ·

]

=

[

ea 00 eb

]

.

6

Example 2 Let A =

[

0 −11 0

]

. Calculate: A2 = −I , A3 = −A, A4 = I .7

Then for any constant t8

eAt =

[

1 − t2/2! + t4/4! + · · · −t + t3/3!− t5/5! + · · ·t − t3/3! + t5/5! + · · · 1 − t2/2! + t4/4! + · · ·

]

=

[

cos t − sin tsin t cos t

]

.

The last example allows us to express the solution of the system9

(3.4) x′1 = −x2, x1(0) = α

10

x′2 = x1, x2(0) = β ,

with prescribed initial conditions α and β, in the form11

[

x1(t)x2(t)

]

= eAt

[

αβ

]

=

[

cos t − sin tsin t cos t

] [

αβ

]

,

which is the rotation of the initial position vector

[

α

β

]

by the angle t,12

counterclockwise. We see that the integral curves of the system (3.4) are13

circles in the (x1, x2) plane. This makes sense, because the velocity vector14[

x′1

x′2

]

=

[

−x2

x1

]

is perpendicular to the position vector

[

x1

x2

]

at all t.15

In general, eA+B 6= eA eB . This is because AB 6= BA, for general n × n16

matrices. One way to show that ex+y = ex ey holds for numbers is to expand17

Page 190: Lectures on Linear Algebra Philip Korman

190 CHAPTER 6. SYSTEMS OF DIFFERENTIAL EQUATIONS

all three exponentials in power series, and show that the series on the left1

is the same as the one on the right. In the process, we use that xy = yx2

for numbers. The same argument shows that eA+B = eA eB , provided that3

BA = AB, or the matrices commute. In particular, eaI+A = eaIeA, because4

(aI)A = A(aI) (a is any number).5

Example 3 Let A =

[

3 −1

1 3

]

, then A = 3I +

[

0 −1

1 0

]

, and therefore6

eAt = e3tIe

2

4

0 −tt 0

3

5

= e3tI

[

cos t − sin t

sin t cos t

]

7

=

[

e3t 0

0 e3t

] [

cos t − sin t

sin t cos t

]

= e3t

[

cos t − sin t

sin t cos t

]

.

Example 4 Let K =

0 1 0 00 0 1 0

0 0 0 10 0 0 0

. Calculate K2 =

0 0 1 00 0 0 1

0 0 0 00 0 0 0

,8

K3 =

0 0 0 10 0 0 0

0 0 0 00 0 0 0

, K4 = O, the zero matrix, and therefore Km = O for9

m ≥ 4. The series for eKt terminates:10

eKt = I + Kt +1

2!K2t2 +

1

3!K3t3 =

1 t 12! t

2 13! t

3

0 1 t 12! t

2

0 0 1 t0 0 0 1

.

Example 5 Let J =

−2 1 0 0

0 −2 1 00 0 −2 1

0 0 0 −2

, a Jordan block. Writing11

J = −2I + K, and proceeding as in Example 3, obtain12

eJt = e−2t

1 t 12! t

2 13! t

3

0 1 t 12! t

2

0 0 1 t0 0 0 1

.

Page 191: Lectures on Linear Algebra Philip Korman

6.3. THE EXPONENTIAL OF A MATRIX 191

Norm of a Matrix, and Convergence of the Series for eA1

Recall the concept of a norm (length) of an n-dimensional vector x ∈ Rn,2

defined by3

||x||2 = x · x =

n∑

i=1

x2i ,

and the Cauchy-Schwarz inequality that states:4

|x · y| ≤ ||x|| ||y|| .

Let A be an n × n matrix, given by its columns A = [C1 C2 . . .Cn]. (C1 is5

the first column of A, etc.) Define the norm ||A|| of A, as follows6

(3.5) ||A||2 =n

i=1

||Ci||2 =n

i=1

n∑

j=1

a2ij .

Clearly7

(3.6) |aij| ≤ ||A|| , for all i and j ,

since the double summation on the right in (3.5) is greater or equal than8

any one of its terms. If x ∈ Rn, we claim that9

(3.7) ||Ax|| ≤ ||A|| ||x|| .

Indeed, using the Cauchy-Schwarz inequality10

||Ax||2 =∑n

i=1

(

∑nj=1 aijxj

)2≤ ∑n

i=1

(

∑nj=1 a2

ij

∑nj=1 x2

j

)

= ||x||2 ∑ni=1

∑nj=1 a2

ij = ||A||2 ||x||2 .

Let B be another n × n matrix, given by its columns B = [K1 K2 . . .Kn].11

Recall that AB = [AK1 AK2 . . .AKn]. (AK1 is the first column of the12

product AB, etc.) Then, using (3.7),13

||AB||2 =n

i=1

||AKi||2 ≤ ||A||2n

i=1

||Ki||2 = ||A||2||B||2 ,

which implies that14

||AB|| ≤ ||A|| ||B|| .Applying this inequality to two matrices at a time, one shows that15

(3.8) ||A1A2 · · ·Am|| ≤ ||A1|| ||A2|| · · · ||Am|| ,

Page 192: Lectures on Linear Algebra Philip Korman

192 CHAPTER 6. SYSTEMS OF DIFFERENTIAL EQUATIONS

for any integer m > 0, and in particular ||Am|| ≤ ||A||m. Similarly one1

proves the inequalities like2

(3.9) ||A + B + C|| ≤ ||A||+ ||B||+ ||C|| ,

for an arbitrary number of matrices of the same type.3

The inequalities (3.6) and (3.9) imply that the exponential of any square4

matrix A5

eA =

∞∑

k=0

1

k!Ak

is a convergent series in each component. Indeed, by (3.6) the ij-component6

of the partial sum∑N

k=01k! Ak is bounded by ||∑N

k=01k! Ak||, which in turn7

is bounded by∑N

k=01k! ||A||k, in view of (3.9) and (3.8). The last partial8

sum converges to e||A||, as N → ∞. The series in each component converges9

by the comparison test.10

Exercises11

1. Find the exponentials eAt of the following matrices.12

a. A =

[

0 −10 0

]

. Answer. eAt =

[

1 −t0 1

]

.13

b. A =

0 1 0

0 0 10 0 0

. Answer. eAt =

1 t 12 t2

0 1 t0 0 1

.14

c. A =

−2 1 00 −2 1

0 0 −2

. Answer. eAt = e−2t

1 t 12 t2

0 1 t

0 0 1

.15

d. A =

0 −1 01 0 1

0 0 −2

. Answer. eAt =

cos t − sin t 0sin t cos t 0

0 0 e−2t

.16

2. Show that(

eA)−1

= e−A.17

3. Show that(

eA)T

= eAT

.18

4. Let A be a skew-symmetric matrix (so that AT = −A).19

a. Show that eAt is an orthogonal matrix for any t.20

Page 193: Lectures on Linear Algebra Philip Korman

6.4. THE GENERAL CASE OF REPEATED EIGENVALUES 193

b. Show that the solution x(t) of1

x′ = Ax , x(0) = x0

satisfies ||x(t)|| = ||x0|| for all t.2

5. For any square matrix X define3

sin X = X − 1

3!X3 +

1

5!X5 − · · ·

a. Show that the series converges for any X .4

b. Let J =

0 1 0 00 0 1 0

0 0 0 10 0 0 0

. Show that sinJ =

0 1 0 −16

0 0 1 0

0 0 0 10 0 0 0

.5

6.4 The General Case of Repeated Eigenvalues6

We now return to solving linear systems7

(4.1) x′ = Ax , x(0) = w ,

with given n× n matrix A, and a given vector w ∈ Rn. Suppose that λ = r8

is an eigenvalue of A of multiplicity m, meaning that λ = r is a root of mul-9

tiplicity m of the corresponding characteristic equation |A − λI | = 0. This10

root must bring in m linearly independent solutions for the general solution.11

If there are m linearly independent eigenvectors ξ1, ξ2, . . . , ξm corresponding12

to λ = r, then ertξ1, ertξ2, . . . , e

rtξm give the desired m linearly independent13

solutions. However, if there are only k < m linearly independent eigenvec-14

tors one needs the notion of generalized eigenvectors. (Recall that the case15

m = 2, k = 1 was considered previously.)16

A vector wm is called a generalized eigenvector, corresponding to λ = r,17

provided that18

(4.2) (A − rI)mwm = 0 ,

but19

(4.3) (A − rI)m−1 wm 6= 0 .

It follows from the theory of Jordan normal forms that a generalized eigen-20

vector wm can always be found, and by (4.3), wm 6= 0. Constructing wm is21

Page 194: Lectures on Linear Algebra Philip Korman

194 CHAPTER 6. SYSTEMS OF DIFFERENTIAL EQUATIONS

usually not hard. The solution set of (4.2) is often multidimensional, and1

then it is easy to find a solution satisfying (4.3).2

Through matrix multiplications define a chain of vectors3

wm−1 = (A − rI)wm

wm−2 = (A − rI)wm−1 = (A − rI)2 wm

. . . . . .

w1 = (A − rI)w2 = (A − rI)m−1 wm ,

or4

wm−i = (A − rI)i wm , for i = 1, 2, . . .m − 1 .

Since i steps in the chain bring us down from wm to wm−i, it follows that5

m − i steps take us down from wm to wi:6

wi = (A − rI)m−i wm .

Observe that7

(A − rI)i wi = (A − rI)m wm = 0 ,

and then8

(4.4) (A − rI)j wi = 0 , for j ≥ i .

Notice also that w1 is an eigenvector of A corresponding to λ = r because9

(A − rI)w1 = (A − rI)m wm = 0 .

So that our chain begins with a generalized eigenvector wm and ends with10

an eigenvector w1.11

Lemma 6.4.1 The vectors wm, wm−1, . . . , w1 of the chain are linearly in-12

dependent.13

Proof: We need to show that14

(4.5) cmwm + cm−1wm−1 + · · ·+ c1w1 = 0

is possible only if all the coefficients ci = 0. Multiply all terms of the15

equation (4.5) by (A − rI)m−1. Using (4.4), obtain16

cm (A − rI)m−1 wm = 0 .

Page 195: Lectures on Linear Algebra Philip Korman

6.4. THE GENERAL CASE OF REPEATED EIGENVALUES 195

Since (A − rI)m−1 wm 6= 0, by the definition of the generalized eigenvector,1

it follows that cm = 0, so that (4.5) becomes2

cm−1wm−1 + · · ·+ c1w1 = 0 .

Multiplying this equation by (A − rI)m−2 gives cm−1 = 0 by a similar rea-3

soning, and so on, to obtain cm = cm−1 = · · · = c1 = 0. ♦4

5

Solution of the system (4.1) can be written as6

x(t) = eAtw = ertIe(A−rI)tw = erte(A−rI)tw

= ert[

I + (A − rI) t + 12! (A − rI)2 t2 + 1

3! (A − rI)3 t3 + · · ·]

w

= ert[

w + (A − rI)w t + (A − rI)2 w 12!t

2 + (A − rI)3 w 13!t

3 + · · ·]

.

Here we used the definition of the matrix exponential, and that the matrices7

A − rI and rI commute. In case w is any vector of the chain, by (4.4)8

these series terminate after finitely many terms, and we obtain m linearly9

independent solutions of the system (4.1), corresponding to the eigenvalue10

λ = r, by setting w equal to w1, w2, . . . , wm:11

x1(t) = eAtw1 = ertw1

x2(t) = eAtw2 = ert [w2 + w1t]

x3(t) = eAtw3 = ert[

w3 + w2t + w112!t

2]

. . . . . .

xm(t) = eAtwm = ert[

wm + wm−1t + wm−212! t

2 + · · ·+ w11

(m−1)! tm−1

]

.

These solutions are linearly independent because each wk does not belong12

to the span of w1, . . . , wk−1.13

Example 1 Let us find the general solution of14

x′(t) =

2 1 2

−5 −1 −71 0 2

x(t) .

The matrix of this system A =

2 1 2

−5 −1 −71 0 2

has an eigenvalue r = 1 of15

Page 196: Lectures on Linear Algebra Philip Korman

196 CHAPTER 6. SYSTEMS OF DIFFERENTIAL EQUATIONS

multiplicity m = 3, and only one linearly independent eigenvector

−1

−12

.1

Calculate2

A − rI = A − I =

1 1 2

−5 −2 −71 0 1

,

3

(A − rI)2 = (A− I)2 =

−2 −1 −3−2 −1 −3

2 1 3

,

4

(A − rI)3 = (A− I)3 =

0 0 00 0 0

0 0 0

.

Clearly, any vector w ∈ R3 satisfies (A − I)3w = 0, for example w3 =5

1

00

. Since (A−I)2w3 6= 0, it follows that w3 is a generalized eigenvector.6

Calculate the chain7

w2 = (A − I)w3 =

1 1 2−5 −2 −7

1 0 1

10

0

=

1−5

1

,

8

w1 = (A − I)w1 =

1 1 2−5 −2 −7

1 0 1

1−5

1

=

−2−2

2

.

(Observe that w1 is an eigenvector corresponding to r = 1.) The three9

linearly independent solutions are10

x1(t) =

−2−2

2

et ,

11

x2(t) =

1−5

1

et +

−2−2

2

tet ,

Page 197: Lectures on Linear Algebra Philip Korman

6.4. THE GENERAL CASE OF REPEATED EIGENVALUES 197

1

x3(t) =

1

00

et +

1

−51

tet +

−2

−22

12 t2et .

The general solution is2

x(t) = c1x1(t) + c2x2(t) + c3x3(t) .

The constants c1, c2 and c3 are determined by initial conditions.3

Since one can determine the form of solution for any n × n system, the4

following important theorem follows.5

Theorem 6.4.1 Assume that all eigenvalues of the matrix A are either6

negative or have negative real parts. Then all solutions of the system7

x′ = A x

tend to zero as t → ∞.8

Proof: If λ < 0 is a simple eigenvalue, it contributes the term eλtξ to the9

general solution (ξ is the corresponding eigenvector). If λ < 0 is a repeated10

eigenvalue, the vectors it contributes to the general solution are of the form11

tkeλtξ, where k is a positive integer. By L’Hospital’s rule limt→∞ tkeλtξ = 0.12

Finally, if λ = p+ iq is simple and p < 0, it contributes the terms ept cos qt ξ13

and ept sin qt η, both tending to zero as t → ∞. A repeated complex eigen-14

value contributes the terms of the form tkept cos qt ξ and tkept sin qt η, also15

tending to zero as t → ∞. ♦16

Fundamental Matrix17

For an arbitrary n × n system18

(4.6) x′ = Ax

it is always possible to find n linearly independent solutions x1(t), x2(t), . . . , xn(t),19

as we saw above. Their linear combination20

(4.7) x(t) = c1x1(t) + c2x2(t) + · · ·+ cnxn(t) ,

Page 198: Lectures on Linear Algebra Philip Korman

198 CHAPTER 6. SYSTEMS OF DIFFERENTIAL EQUATIONS

with arbitrary coefficients c1, c2, . . . , cn, is also a solution of (4.6). Form an1

n × n solution matrix X(t) = [x1(t) x2(t) . . .xn(t)], using solutions as its2

columns, and the vector c =

c1

c2...

cn

. Then the solution in (4.7) can be3

written as a matrix product4

(4.8) x(t) = X(t)c .

The matrix X(t) is invertible for all t because its columns are linearly in-5

dependent. The formula (4.7) (or (4.8)) gives the general solution of the6

system (4.6), meaning that solution of any initial value problem7

(4.9) x′ = Ax , x(0) = x0 ,

with a given vector x0 ∈ Rn can be found among the solutions in (4.7) for8

some choice of c1, c2, . . . , cn. Indeed, the solution x(t) needs to satisfy9

x(0) = X(0)c = x0 ,

and one can solve this n × n system for the vector c, because X(0) is an10

invertible matrix.11

If one chooses the solutions satisfying x1(0) = e1, x2(0) = e2, . . . , xn(0) =12

en, the coordinate vectors, then the corresponding solution matrix Φ(t) =13

[x1(t) x2(t) . . .xn(t)] is called the fundamental solution matrix of (4.6), or14

the fundamental matrix for short. Its advantage is that x(t) = Φ(t)x0 gives15

the solution of the any initial value problem (4.9). Indeed, this solution16

satisfies17

x(0) = Φ(0)x0 = [x1(0) x2(0) . . .xn(0)]x0 = [e1 e2 . . . en] x0 = Ix0 = x0 .

Example 2 Find the fundamental matrix for18

x′(t) =

[

0 −11 0

]

x(t) ,

and use it to express the solution with x1(0) = −2, x2(0) = 3.19

The solution x1(t) =

[

cos tsin t

]

satisfies x1(0) = e1, and x2(t) =

[

− sin tcos t

]

20

satisfies x2(0) = e2. It follows that Φ(t) =

[

cos t − sin tsin t cos t

]

, and the solu-21

tion with the prescribed initial conditions is22

x(t) = Φ(t)

[

−23

]

=

[

cos t − sin tsin t cos t

] [

−23

]

=

[

−2 cos t − 3 sin t−2 sin t + 3 cos t

]

.

Page 199: Lectures on Linear Algebra Philip Korman

6.5. NON-HOMOGENEOUS SYSTEMS 199

Finally, observe that solution matrix X(t) satisfies the following matrix1

differential equation2

(4.10) X ′(t) = AX(t) .

Indeed, the first column on the left is x′1(t), and on the right it is Ax1, and3

the equality x′1 = Ax1 reflects the fact that x1 is a solution of our system4

(4.6). Similarly one shows that the other columns are identical.5

Exercises6

1. Solve the following systems.7

a. x′(t) =

2 1 2−5 −1 −7

1 0 2

x(t), x(0) =

2−1

1

.8

Answer. x1(t) = −et(

3t2 − 3t − 2)

, x2(t) = −et(

3t2 + 15t + 1)

, x3(t) =9

et(

3t2 + 3t + 1)

.10

b. x′(t) =

2 1 10 2 −3

0 0 −1

x(t), x(0) =

0−1

3

.11

Answer. x1(t) = −2e−t + 2e2t − 4te2t, x2(t) = 3e−t − 4e2t, x3(t) = 3e−t.12

c. x′(t) =

0 1 2

1 −2 1−2 −1 −4

x(t), x(0) =

6

02

.13

Answer. x(t) =

2e−2t(

2t2 + 8t + 3)

8te−2t

−2e−2t(

2t2 + 8t − 1)

.14

d. x′(t) =

0 0 10 1 0

1 0 0

x(t), x(0) =

12

3

.15

Answer. x(t) =

2et − e−t

2et + e−t

2et

.16

Page 200: Lectures on Linear Algebra Philip Korman

200 CHAPTER 6. SYSTEMS OF DIFFERENTIAL EQUATIONS

6.5 Non-Homogeneous Systems1

We now study non-homogeneous systems2

(5.11) x′ = Ax + f(t) .

Here A is an n × n matrix, with given constant coefficients, and a vector-3

function f(t) ∈ Rn is also prescribed. For the corresponding homogeneous4

system5

(5.12) x′ = Ax

the general solution, which is denoted by w(t), can be obtained by the6

methods studied above (w(t) depends on n arbitrary constants, recall the7

representation w(t) = X(t)c using solution matrix). Let the vector-function8

Y (t) be any particular solution of (5.11) so that9

(5.13) Y ′ = AY + f(t) .

Subtracting (5.13) from (5.11) gives10

(x − Y )′ = A (x − Y ) ,

so that x−Y is a solution of the corresponding homogeneous system (5.12),11

and so x(t) − Y (t) = w(t) for some choice of arbitrary constants, and then12

x(t) = Y (t) + w(t) .

Conclusion: the general solution of the non-homogeneous system (5.11) is13

the sum of any particular solution Y (t) of this system and the general solu-14

tion of the corresponding homogeneous system.15

Sometimes one can guess the form of the particular solution Y (t).16

Example 1 Solve the system17

x′1 = 2x1 + x2 − 8e−t

x′2 = x1 + 2x2 .

Search for particular solution in the form Y (t) =

[

Ae−t

Be−t

]

, or x1 = Ae−t,18

x2 = Be−t . Substitution produces an algebraic system for A and B. Calcu-19

late A = 3, B = −1, so that Y (t) =

[

3e−t

−e−t

]

. The general solution of the20

corresponding homogeneous system21

x′ =

[

2 11 2

]

x

Page 201: Lectures on Linear Algebra Philip Korman

6.5. NON-HOMOGENEOUS SYSTEMS 201

is x(t) = c1et

[

−1

1

]

+ c2e3t

[

1

1

]

.1

Answer. x(t) =

[

3e−t

−e−t

]

+ c1et

[

−11

]

+ c2e3t

[

11

]

.2

Example 2 Solve the system3

x′ =

[

2 1

1 2

]

x +

[

−3t + 1

−6

]

.

Search for particular solution in the form Y (t) =

[

At + BCt + D

]

, and calculate4

Y (t) =

[

2t − 1−t + 3

]

. The corresponding homogeneous system is the same as5

in Example 1.6

Answer. x(t) =

[

2t − 1

−t + 3

]

+ c1et

[

−11

]

+ c2e3t

[

11

]

.7

In the above examples one had to guess the form of particular solution8

Y (t), which is not possible in most cases. A more general method for finding9

a particular solution of non-homogeneous system (5.11), called the variation10

of parameters, is described next.11

If X(t) is a solution matrix of the corresponding homogeneous system12

(5.12), then x(t) = X(t)c = c1x1(t)+c2x2(t)+· · ·+cnxn(t) gives the general13

solution of (5.12), as we saw in the preceding section. Let us search for a14

particular solution of (5.11) in the form15

(5.14) x(t) = X(t)c(t) = c1(t)x1(t) + c2(t)x2(t) + · · ·+ cn(t)xn(t) .

Here the constants c1, c2, . . . , cn from general solution are replaced by the16

unknown functions c1(t), c2(t), . . . , cn(t). (Functions are “variable quanti-17

ties”, explaining the name of this method.) By the product rule, x′(t) =18

X ′(t)c(t) + X(t)c′(t) so that the substitution of x(t) = X(t)c(t) into (5.11)19

gives20

X ′(t)c(t) + X(t)c′(t) = AX(t)c(t) + f(t) .

Since X ′(t) = AX(t) by the formula (4.10) from the preceding section, two21

terms cancel, giving22

(5.15) X(t)c′(t) = f(t) .

Page 202: Lectures on Linear Algebra Philip Korman

202 CHAPTER 6. SYSTEMS OF DIFFERENTIAL EQUATIONS

Because the matrix X(t) is non-singular, one can solve this n× n system of1

linear equations for c′1(t), c′2(t), . . . , c

′n(t), and then obtain c1(t), c2(t), . . . , cn(t)2

by integration. (One can also express c′(t) = X−1(t)f(t), and then c(t) =3∫ t

t0X−1(s)f(s) ds, with t0 arbitrary.)4

Example 3 Find the general solution to the system5

x′1 = 2x1 − x2 + te−t

x′2 = 3x1 − 2x2 − 2 .

Here A =

[

2 −1

3 −2

]

and f(t) =

[

te−t

−2

]

. The matrix A has an eigenvalue6

λ1 = −1 with the corresponding eigenvector ξ1 =

[

1

3

]

, and an eigenvalue7

λ2 = 1 with the corresponding eigenvector ξ2 =

[

1

1

]

. It follows that the8

general solution of the corresponding homogeneous system (x =

[

x1

x2

]

)9

x′ =

[

2 −13 −2

]

x

is x(t) = c1e−t

[

13

]

+ c2et

[

11

]

= c1

[

e−t

3e−t

]

+ c2

[

et

et

]

, and X(t) =10

[

e−t et

3e−t et

]

is a fundamental matrix. We search for a particular solution11

in the form Y (t) = X(t)c(t), where c(t) =

[

c1(t)c2(t)

]

. By (5.15) one needs12

X(t)c′(t) = f(t), or13

[

e−t et

3e−t et

][

c′1(t)c′2(t)

]

=

[

te−t

−2

]

.

In components14

e−tc′1(t) + etc′2(t) = te−t

3e−tc′1(t) + etc′2(t) = −2 .

Use Cramer’s rule to solve this system for c′1(t) and c′2(t):15

c′1(t) =

te−t et

−2 et

e−t et

3e−t et

=t + 2et

−2= −1

2t − et ,

Page 203: Lectures on Linear Algebra Philip Korman

6.5. NON-HOMOGENEOUS SYSTEMS 203

1

c′2(t) =

e−t te−t

3e−t −2

e−t et

3e−t et

=−2e−t − 3te−2t

−2= e−t +

3

2te−2t .

Integration gives c1(t) = −14 t2 − et and c2(t) = −e−t − 3

4 te−2t − 38e−2t. In2

both cases we took the constant of integration to be zero, because one needs3

only one particular solution. Obtain a particular solution4

Y (t) = X(t)c(t) =

[

e−t et

3e−t et

] [

−14 t2 − et

−e−t − 34te−2t − 3

8e−2t

]

=

[

−18e−t

(

2t2 + 6t + 3)

− 2

−38e−t

(

2t2 + 2t + 1)

− 4

]

.

Answer. x(t) =

[

−18e−t

(

2t2 + 6t + 3)

− 2−3

8e−t(

2t2 + 2t + 1)

− 4

]

+ c1e−t

[

13

]

+ c2et

[

11

]

.5

Exercises6

1. Find general solutions of the following systems by guessing the form of a7

particular solution.8

a. x′ =

[

0 11 0

]

x +

[

2e2t

−e2t

]

.9

Answer. x(t) =

[

e2t

0

]

+ c1e−t

[

−1

1

]

+ c2et

[

1

1

]

.10

b. x′ =

[

0 1

1 0

]

x +

[

e2t

0

]

.11

Answer. x(t) =

[

23e2t

13e2t

]

+ c1e−t

[

−1

1

]

+ c2et

[

1

1

]

.12

c. x′ =

[

0 −11 0

]

x +

[

3 cos t − sin tcos t − sin t

]

.13

Hint. Search for a particular solution in the form x(t) =

[

A cos t + B sin tC cos t + D sin t

]

.14

15

Answer. x(t) =

[

cos t + sin t2 sin t

]

+ c1

[

cos tsin t

]

+ c2

[

− sin tcos t

]

.16

Page 204: Lectures on Linear Algebra Philip Korman

204 CHAPTER 6. SYSTEMS OF DIFFERENTIAL EQUATIONS

d. x′ =

[

2 2

2 −1

]

x +

[

2t − 1

−t

]

.1

Hint. Search for a particular solution in the form x(t) =

[

At + BCt + D

]

.2

Answer. x(t) =

[

−16

−t + 23

]

+ c1e−2t

[

−12

]

+ c2e3t

[

21

]

.3

e. x′ =

[

0 1

1 0

]

x +

[

e2t

−t

]

.4

Hint. Break the search for a particular solution into two pieces Y (t) =5

Y1(t) + Y2(t), where Y1(t) is a particular solution for the system in part (b),6

and Y2(t) is a particular solution for the system x′ =

[

0 11 0

]

x +

[

0−t

]

.7

Answer. x(t) =

[

23e2t + t13e2t + 1

]

+ c1e−t

[

−1

1

]

+ c2et

[

1

1

]

.8

f. x′ =

[

0 11 0

]

x +

[

e2t

−2et

]

.9

2. Solve the following initial value problems.10

a. x′(t) =

[

1 2

4 3

]

x(t) +

[

1

−1

]

, x(0) =

[

1

−2

]

.11

Answer. x1(t) =e−t

3− e5t

3+ 1, x2(t) = −e−t

3 − 2e5t

3 − 1.12

b.13 x′1 = 3x1 + 5x2 + t , x1(0) = 0

x′2 = −5x1 − 3x2 , x2(0) = 0 .

Answer. x1(t) =1

64(12t + 4 − 3 sin4t − 4 cos 4t), x2(t) =

5

64(sin 4t − 4t).14

3. Solve the following initial value problems.15

a.16 x′1 = x1 + 2x2 + e−t , x1(0) = 0

x′2 = 4x1 + 3x2 , x2(0) = 0 .

Answer. x1(t) =e5t

18+

1

18e−t(12t− 1), x2(t) =

e5t

9− 1

9e−t(6t + 1).17

b.18

x′1 = −x2 + sin t , x1(0) = 1

x′2 = x1 , x2(0) = 0 .

Answer. x1(t) =1

2t sin t + cos t, x2(t) =

1

2(3 sin t − t cos t).19

Page 205: Lectures on Linear Algebra Philip Korman

Chapter 71

Applications to Calculus and2

Differential Geometry3

7.1 Hessian Matrix4

In this section we use positive definite matrices to determine minimums5

and maximums of functions with two or more variables. But first a useful6

decomposition of symmetric matrices is discussed.7

A = LDLT decomposition8

Assume that Gaussian elimination can be performed for an n× n matrix A9

without any row exchanges, and |A| 6= 0. Then one can decompose A = LU ,10

where L is a lower triangular matrix with the diagonal entries equal to 1,11

and U is an upper triangular matrix with the diagonal entries equal to the12

pivots of A, denoted by d1, d2, . . . , dn. Observe that all di 6= 0, because13

|A| = d1d2 · · ·dn 6= 0. The decomposition A = LU is unique.14

Write U = DU1, where D is a diagonal matrix, with the diagonal entries15

equal to d1, d2, . . . , dn, and U1 is another upper triangular matrix with the16

diagonal entries equal to 1. (The row i of U1 is obtained by dividing the row17

i of U by di.) Then18

(1.1) A = LDU1 ,

and this decomposition is unique.19

Now suppose in addition that A is symmetric, so that AT = A. Then20

A = AT = (LDU1)T = UT

1 DLT .

205

Page 206: Lectures on Linear Algebra Philip Korman

206CHAPTER 7. APPLICATIONS TO CALCULUS AND DIFFERENTIAL GEOMETRY

Comparison with (1.1) gives UT1 = L (and LT = U1) since the decomposition1

(1.1) is unique. We conclude that any symmetric matrix A, with |A| 6= 0,2

can be decomposed as3

(1.2) A = LDLT ,

where L is a lower triangular matrix with the diagonal entries equal to 1,4

and D is a diagonal matrix. The diagonal entries of D are the non-zero5

pivots of A.6

Sylvester’s Criterion7

For the n × n matrix8

A =

a11 a12 a13 . . . a1n

a21 a22 a23 . . . a2n

a31 a32 a33 . . . a3n

. . . . . . . . . . . . . . .an1 an2 an3 . . . ann

the sub-matrices9

A1 = a11 , A2 =

[

a11 a12

a21 a22

]

, A3 =

a11 a12 a13

a21 a22 a23

a31 a32 a33

, . . . , An = A

are called the principal sub-matrices. The determinants of the principal10

sub-matrices11

|A1| = a11 , |A2| =

a11 a12

a21 a22

, |A3| =

a11 a12 a13

a21 a22 a23

a31 a32 a33

, . . . , |An| = |A|

are called the principal minors.12

Theorem 7.1.1 A symmetric matrix A is positive definite if and only if all13

of its principal minors are positive.14

Proof: Assume that A is positive definite, which so that Ax · x > 015

for all x 6= 0. Let x = e1, the first coordinate vector. Then |A1| = a11 =16

Ae1 · e1 > 0. (Using x = ei, one can conclude that aii > 0 for all i. Let17

Page 207: Lectures on Linear Algebra Philip Korman

7.1. HESSIAN MATRIX 207

now x =

x1

x2

0...

0

. Then 0 < Ax · x = A2

[

x1

x2

]

·[

x1

x2

]

for any vector1

[

x1

x2

]

∈ R2. It follows that the 2 × 2 matrix A2 is positive definite, and2

then both eigenvalues of A2 is positive, so that |A2| > 0 as the product of3

positive eigenvalues. Using x =

x1

x2

x3

0...

0

, one concludes similarly that that4

|A3| > 0, and so on.5

Conversely, assume that all principal minors are positive. Let us apply6

Gaussian elimination to A. We claim that all pivots are positive. Indeed,7

the first pivot d1 is the first principal minor a11 > 0. If d2 denotes the second8

pivot, then9

0 < |A2| = d1d2 ,

so that d2 > 0. Similarly10

0 < |A3| = d1d2d3 ,

implying that the third pivot d3 is positive, and so on.11

Since all pivots of A are positive, no row exchanges are needed in Gaus-12

sian elimination, and by (1.2) we can decompose A = LDLT , where L is a13

lower triangular matrix with the diagonal entries equal to 1, and D is a diag-14

onal matrix. The diagonal entries of D are the positive pivots d1, d2, . . . , dn15

of A.16

For any x 6= 0, let y = LT x. Observe that y 6= 0, since otherwise17

x =(

LT)−1

y = 0 (LT is invertible, because |LT | = 1 6= 0). Then18

Ax · x = LDLTx · x = DLTx · LTx = Dy · y= d1y

21 + d2y

22 + · · ·+ dny2

n > 0 ,

so that A is positive definite. ♦19

Page 208: Lectures on Linear Algebra Philip Korman

208CHAPTER 7. APPLICATIONS TO CALCULUS AND DIFFERENTIAL GEOMETRY

A symmetric matrix A is called negative definite if −A is positive definite,1

which implies that (−A)x · x > 0 for all x 6= 0, and that all eigenvalues of2

−A are positive. It follows that for a negative definite matrix Ax · x < 0,3

and that all eigenvalues of A are negative.4

Theorem 7.1.2 A symmetric matrix A is negative definite if and only if5

all of its principal minors satisfy (−1)k|Ak| > 0.6

Proof: The principal minors of the matrix −A are7

|(−A)k| = | − Ak| = (−1)k|Ak| > 0 .

By Sylvester’s criterion the matrix −A is positive definite. ♦8

By Taylor’s formula, any twice continuously differentiable function can9

be approximated around an arbitrary point x0 as10

(1.3) f(x) ≈ f(x0) + f ′(x0)(x− x0) +1

2f ′′(x0)(x− x0)

2 ,

for x near x0. In case x0 is a critical point, when f ′(x0) = 0, one has11

(1.4) f(x) ≈ f(x0) +1

2f ′′(x0)(x− x0)

2 .

In case f ′′(x0) > 0 it follows that f(x) > f(x0) for x near x0, so that x0 is a12

point of local minimum. If f ′′(x0) < 0 then x0 is a point of local maximum.13

Setting x = x0 + h, one can rewrite (1.3) as14

f(x0 + h) ≈ f(x0) + f ′(x0)h +1

2f ′′(x0)h

2 ,

for |h| small.15

Let now f(x, y) be twice continuously differentiable function of two vari-16

ables. Taylor’s approximation near a fixed point (x0, y0) uses partial deriva-17

tives (here fx = ∂f∂x

, fxx = ∂2f∂x2 , etc.)18

f(x0 + h1, y0 + h2) ≈ f(x0, y0) + fx(x0, y0)h1 + fy(x0, y0)h2(1.5)

+12

[

fxx(x0, y0)h21 + 2fxy(x0, y0)h1h2 + fyy(x0, y0)h

22

]

,

provided both |h1| and |h2| are small. If (x0, y0) is a critical point where19

fx(x0, y0) = fy(x0, y0) = 0, then20

f(x0 + h1, y0 + h2) ≈ f(x0, y0)(1.6)

+12

[

fxx(x0, y0)h21 + 2fxy(x0, y0)h1h2 + fyy(x0, y0)h

22

]

.

Page 209: Lectures on Linear Algebra Philip Korman

7.1. HESSIAN MATRIX 209

The second term on the right is a quadratic form in h1, h2 with the matrix1

H =

[

fxx(x0, y0) fxy(x0, y0)

fxy(x0, y0) fyy(x0, y0)

]

called the Hessian matrix. (One can also write H =

[

fxx(x0, y0) fxy(x0, y0)fyx(x0, y0) fyy(x0, y0)

]

,2

because fyx(x0, y0) = fxy(x0, y0).) Using the vector h =

[

h1

h2

]

one can3

write the quadratic form in (1.6) as Hh · h. If the matrix H is positive4

definite, so that Hh · h for all h 6= 0, then5

f(x0 + h1, y0 + h2) > f(x0, y0) for all h1 and h2 .

It follows that f(x, y) > f(x0, y0) for all points (x, y) near (x0, y0), so that6

(x0, y0) is a point of minimum. By Sylvester’s criterion Theorem 7.1.1, H is7

positive definite provided that fxx(x0, y0) > 0 and fxx(x0, y0)fyy(x0, y0) −8

f2xy(x0, y0) > 0. If the Hessian matrix H is negative definite, then9

f(x0 + h1, y0 + h2) < f(x0, y0) for all h1 and h2 ,

and (x0, y0) is a point of maximum. By Theorem 7.1.2, H is negative definite10

provided that fxx(x0, y0) < 0 and fxx(x0, y0)fyy(x0, y0)− f2xy(x0, y0) > 0.11

A symmetric matrix A is called indefinite provided the quadratic form12

Ah ·h takes on both positive and negative values. If the Hessian matrix H is13

indefinite, there no extremum at (x0, y0). One says that (x0, y0) is a saddle14

point.15

For functions of more than two variables it is convenient to use vector no-16

tation. If f = f(x1, x2, . . . , xn), we define a row vector x = (x1, x2, . . . , xn),17

and then f = f(x). Taylor’s formula around a fixed point x0 = (x01, x

02, . . . , x

0n)18

takes the form19

f(x) ≈ f(x0) + ∇f(x0) · (x− x0) +1

2H(x0)(x − x0) · (x − x0) ,

for x close to x0 (i.e., when ||x−x0|| is small). Here ∇f(x0) =

fx1(x0)fx2(x0)

...

fxn(x0)

20

is the gradient vector, and21

H(x0) =

fx1x1(x0) fx1x2(x0) . . . fx1xn(x0)fx2x1(x0) fx2x2(x0) . . . fx2xn(x0)

. . . . . . . . . . . .fxnx1(x0) fxnx2(x0) . . . fxnxn(x0)

Page 210: Lectures on Linear Algebra Philip Korman

210CHAPTER 7. APPLICATIONS TO CALCULUS AND DIFFERENTIAL GEOMETRY

is the Hessian matrix.1

A point x0 is called critical if ∇f(x0) = 0, or in components:2

fx1(x01, x

02, . . . , x

0n) = fx2(x

01, x

02, . . . , x

0n) = · · · = fxn(x0

1, x02, . . . , x

0n) = 0 .

At a critical point3

f(x) ≈ f(x0) +1

2H(x0)(x− x0) · (x− x0) ,

for x near x0. So that x0 is a point of minimum if the Hessian H(x0) is4

positive definite, and x0 is a point of maximum if H(x0) is negative definite.5

Sylvester’s criterion and Theorem 7.1.2 give a straightforward way to decide.6

If H(x0) is indefinite then x0 is a saddle point.7

7.2 Jacobian Matrix8

The inverse function of y = 5x is x = 15y. How about y = x2? The inverse9

function cannot be x = ±√y because functions have unique values. So that10

the function f(x) = x2 does not have an inverse function, valid for all x. Let11

us try to invert this function near x = 1. Near that point both x and y are12

positive, so that x =√

y gives the inverse function. Near x = 0 one cannot13

invert f(x) = x2, since there are both positive and negative x near x = 0,14

and the formula is x = ±√y, not a function. Observe that f ′(1) = 2 > 015

so that f(x) is increasing near x = 1. It follows that all y’s near f(1) = 116

come from a unique x, and the inverse function exists. At x = 0, f ′(0) = 0.17

Recall the inverse function theorem from Calculus: if y = f(x) is defined18

on some interval around x0, y0 = f(x0), and f ′(x0) 6= 0, then the inverse19

function x = x(y) exists on some interval around y0.20

Now suppose that21

u = f(x, y)

v = g(x, y) ,

with given functions f(x, y) and g(x, y), and let us try to solve for x and y22

in terms of u and v. What will replace the notion of derivative in this case?23

The matrix of partial derivatives24

J(x, y) =

[

fx(x, y) fy(x, ygx(x, y) gy(x, y

]

is called the Jacobian matrix. The determinant |J(x, y)| is called the Jaco-25

bian determinant.26

Page 211: Lectures on Linear Algebra Philip Korman

7.3. CURVES AND SURFACES 211

7.3 Curves and Surfaces1

7.4 The First Fundamental Form2

Let a surface S be given by a vector function γ(u, v), with (u, v) belonging3

to some parameter region D. Any curve (u(t), v(t)) in the region D defines4

a curve on the surface S: γ(t) = γ(u(t), v(t)). The length of this curve5

between two parameter values of t = t0 and t = t1 is6

(4.1) L =

∫ t1

t0

||γ ′(t)|| dt =

∫ t1

t0

ds .

Using the chain rule calculate7

γ ′(t) = γuu′(t) + γvv′(t) ,

and then8

||γ ′(t)||2 = γ ′(t) · γ ′(t) = (γuu′(t) + γvv′(t)) · (γuu′(t) + γvv

′(t))

= γu · γu u′2(t) + 2γu · γv u′(t)v′(t) + γv · γv v′2(t) .

It is customary to denote9

E = γu · γu ,(4.2)

F = γu · γv ,

G = γv · γv .

10

Then11

(4.3) ||γ ′(t)|| =

E u′2(t) + 2F u′(t)v′(t) + G v′2(t) ,

so that12

(4.4) L =

∫ t1

t0

E u′2(t) + 2F u′(t)v′(t) + G v′2(t) dt .

It follows that13

ds =√

E u′2(t) + 2F u′(t)v′(t) + G v′2(t) dt

=√

E (u′(t) dt)2 + 2F (u′(t) dt)(v′(t) dt) + G (v′(t) dt)2

=√

E du2 + 2F dudv + Gdv2 ,

Page 212: Lectures on Linear Algebra Philip Korman

212CHAPTER 7. APPLICATIONS TO CALCULUS AND DIFFERENTIAL GEOMETRY

1

(4.5) ds2 = E du2 + 2F dudv + Gdv2 .

This quadratic form in the variables du and dv is called the first fundamental2

form.3

Example 1 Recall that the unit sphere around the origin, ρ = 1, can be4

represented as γ(θ, ϕ) = (sinϕ cos θ, sinϕ sin θ, cosϕ). Calculate5

γθ(θ, ϕ) = (− sinϕ sin θ, sinϕ cos θ, 0) ,6

γϕ(θ, ϕ) = (cos ϕ cosθ, cos ϕ sinθ,− sinϕ) .7

E = γθ · γθ = ||γθ||2 = sin2 ϕ(

sin2 θ + cos2 θ)

= sin2 ϕ,8

F = γθ · γϕ = 0,9

G = γϕ · γϕ = ||γϕ||2 = cos2 ϕ(

sin2 θ + sin2 θ)

+ sin2 ϕ = 1.

The first fundamental form is10

ds2 = sin2 ϕ dθ2 + dϕ2 .

Example 2 For the helicoid γ(u, v) = (u cos v, u sinv, v) calculate11

γu(u, v) = (cos v, sin v, 0) ,12

γv(u, v) = (−u sin v, u cosv, 1) ,13

E = γu · γu = 1,14

F = γu · γv = 0,15

G = γv · γv = u2 + 1 .

The first fundamental form is16

ds2 = du2 + (u2 + 1) dv2 .

Assume now that the parameter region D is a rectangle 1 ≤ u ≤ 6,17

0 ≤ v ≤ 4π. Consider a curve u = t2, v = 5t, 1 ≤ t ≤ 2.3, on this helicoid.18

Observe that the curve (t2, 5t) lies in the parameter region D, and hence19

produces a curve on the helicoid. The length of this curve on the helicoid is20

calculated by the formula (4.4) to be21

L =∫ 2.31

u′2(t) + (u2(t) + 1) v′2(t) dt =∫ 2.31

4t2 + 25(t4 + 1) dt ≈ 20.35 .

Page 213: Lectures on Linear Algebra Philip Korman

7.4. THE FIRST FUNDAMENTAL FORM 213

Figure 7.1: A curve on a helicoid

Example 3 Consider the Mercator projection of the unit sphere γ(u, v) =1

(sech u cos v, sechu sin v, tanhu). Recall that2

(sech u)′ =

(

1

cosh u

)′= − sinh u

cosh2 u= −sech u tanhu ,

and similarly (tanh u)′ = sech2 u. Calculate3

γu(u, v) = (−sech u tanhu cos v,−sechu tanhu sin v, 0) ,

4

γv(u, v) = (−sech u sin v, sechu cos v, 0) ,5

E = ||γu||2 = sech 2u tanh 2u+sech 4u = sech 2u(

tanh 2u + sech 2u)

= sech 2u ,6

F = γu · γv = 0,7

G = ||γv||2 = sech 2u .

The first fundamental form is8

ds2 = sech 2u(

du2 + dv2)

.

Page 214: Lectures on Linear Algebra Philip Korman

214CHAPTER 7. APPLICATIONS TO CALCULUS AND DIFFERENTIAL GEOMETRY

Recall that the angle between two curves at a point of intersection is de-1

fined to be the angle between their tangent lines at the point of intersection.2

On a surface γ = γ(u, v) consider two curves (u(t), v(t)) and (u1(t), v1(t))3

that intersect at some point (u0, v0), with (u(t1), v(t1)) = (u0, v0) and4

(u1(t2), v1(t2)) = (u0, v0). If t and t1 are the respective tangent vectors5

at the point of intersection, the angle θ between the curves is given by6

cos θ =t · t1

||t|| ||t1||.

Expressing the curves as γ(t) = γ(u(t), v(t)) and γ1(t) = γ(u1(t), v1(t)),7

calculate the tangent vectors8

t = γ ′(t) = γuu′(t) + γvv′(t) ,

9

t1 = γ ′(t) = γuu′1(t) + γvv

′1(t) ,

and then10

t · t1 = (γuu′(t) + γvv′(t)) · (γuu′

1(t) + γvv′1(t))

= γu · γuu′u′1 + γu · γuu′v′1 + γv · γuu′

1v′ + γv · γvv

′v′1= Eu′u′

1 + F (u′v′1 + u′1v

′) + Gv′v′1 .

Using the formula (4.3), conclude11

(4.6) cos θ =Eu′u′

1 + F (u′v′1 + u′1v

′) + Gv′v′1√

E u′2 + 2F u′v′ + G v′2√

E u′12 + 2F u′

1v′1 + G v′1

2.

Here E, F, G are evaluated at (u0, v0), u′ and v′ are evaluated at t1, u′1 and12

v′1 are evaluated at t2.13

Example 4 Find the angle between the u curve γ = γ(u, v0) and the v14

curve γ = γ(u0, v) at the point P = (u0, v0).15

The u curve can be parameterized as u(t) = t, v(t) = v0. At t = u0 it16

passes through the point P . Calculate u′ = 1, v′ = 0. The v curve can be17

parameterized as u1(t) = u0, v1(t) = t. At t = v0 it passes through the18

point P . Calculate u′1 = 0, v′1 = 1. By (4.6)19

cos θ =F (u0, v0)

E(u0, v0) G(u0, v0).

The point (u0, v0) is arbitrary. It follows that the coordinate curves are20

orthogonal if and if F (u, v) = 0 for all (u, v).21

Page 215: Lectures on Linear Algebra Philip Korman

7.4. THE FIRST FUNDAMENTAL FORM 215

Given two surfaces S and S1 a map is defined to be a rule assigning to1

each point of S a unique point on S1. If γ(u, v) gives a parameterization of2

S, a map from S to S1 allows one to use the coordinates u and v on S1 too,3

representing S1 with some γ1(u, v). Indeed, each (u, v) in the parameter4

region D is mapped to a unique point on S, and then to a unique point on5

S1. Consequently, a curve (u(t), v(t)) on D provides a curve on S and of its6

image on S1. A map from S to S1 is called conformal if given any point P7

on S, and any two curves on S passing through P , the angle between these8

curves is the same as the angle between their images on S1. (Such maps are9

rare, but very interesting.)10

Theorem 7.4.1 Let E, F, G and E1, F1, G1 be the coefficients of the first11

fundamental forms for S and S1 respectively. The map γ(u, v) → γ1(u, v) is12

conformal provided there exists a function λ(u, v) such that13

E1(u, v) = λ(u, v)E(u, v)(4.7)

F1(u, v) = λ(u, v)F (u, v)

G1(u, v) = λ(u, v)G(u, v) ,

for all (u, v) ∈ D. (In other words, the first fundamental forms are propor-14

tional, with the factor λ(u, v).)15

Proof: By (4.6) the cosine of the angle between the curves on S1 is given16

by17

E1u′u′

1 + F1 (u′v′1 + u′1v

′) + G1v′v′1

E1 u′2 + 2F1 u′v′ + G1 v′2√

E1 u′12 + 2F1 u′

1v′1 + G1 v′1

2

Using the formulas (4.6), then factoring and cancelling λ(u, v) in both the18

numerator and denominator, obtain the formula (4.6), giving cos θ on S. ♦19

20

Observe that the representation γ(u, v) of S can be viewed as a map21

from a region D of the uv-plane to S.22

Example 5 The Mercator projection γ(u, v) = (sech u cos v, sechu sin v, tanhu)23

can be viewed as a map form the strip −∞ < u < ∞, 0 ≤ v ≤ 2π24

to the unit sphere around the origin. Its first fundamental form ds2 =25

sech 2u(

du2 + dv2)

is proportional to du2 + dv2, the first fundamental form26

Page 216: Lectures on Linear Algebra Philip Korman

216CHAPTER 7. APPLICATIONS TO CALCULUS AND DIFFERENTIAL GEOMETRY

of the uv-plane. This map is conformal. This property of Mercator projec-1

tion made it useful for naval navigation since the sixteenth century. Hori-2

zontal lines in the (u, v) coordinate plane are mapped into the meridians on3

the globe (the unit sphere). Lines making an angle α with the horizontal4

lines are mapped into curves making an angle α with the meridians. These5

curves are called loxodromic, and while they do not always give the shortest6

route, they are easy to maintain using compass.7

Exercises8

1. Identify the surfaces, and find the first fundamental form.9

a. γ(u, v) =(

u − v, u + v, u2 + v2)

.10

Answer. z = 12

(

x2 + y2)

, a paraboloid; ds2 = (2 + 4u2) du2 + 4uv dudv +11

(2 + 4v2) dv2.12

b. γ(u, v) = (sinhu sinh v, sinhu cosh v, sinhu).13

Hint. y = ±√

x2 + z2, a double cone extending along the y-axis.14

c. γ(u, v) = (coshu, sinhu, v).15

Answer. x2−y2 = 1, hyperbolic cylinder; ds2 = (sinh2 u+cosh2 u) du2+dv2.16

17

d. γ(u, v) =(

u + 1, v, u2 + v2)

.18

Answer. z = (x − 1)2 + y2, paraboloid; ds2 = (1 + 4u2) du2 + 4uv du dv +19

(1 + 4u2)dv2.20

e. γ(u, v) = (u cos v, u sinv, u), u ≥ 0.21

Answer. z =√

x2 + y2, cone; ds2 = 2 du2 + u2dv2.22

2. On the cone γ(u, v) = (u cos v, u sinv, u), u ≥ 0, sketch the curve u = e2t,23

v = t, 0 ≤ t ≤ 2π, and find its length.24

Answer. 32

(

e4π − 1)

.25

7.5 The Second Fundamental Form26

Recall that the unit normal to the tangent plane for a surface σ(u, v) is given27

by N =σu × σv

||σu × σv||. Observe that28

(5.1) σu · N = σv · N = 0 .

Page 217: Lectures on Linear Algebra Philip Korman

7.5. THE SECOND FUNDAMENTAL FORM 217

Given a point σ(u, v) and nearby points σ(u + ∆u, v + ∆v) on the surface,1

the scalar product2

(5.2) Q = [σ(u + ∆u, v + ∆v)− σ(u, v)] · N

measures how quickly the surface bends away from its tangent plane at3

σ(u, v). (If σ(u + ∆u, v + ∆v) remains on this tangent plane, then Q = 0.)4

By Taylor’s formula5

σ(u + ∆u, v + ∆v) − σ(u, v) ≈ σu(u, v)∆u + σv(u, v)∆v

+12

(

σuu(u, v)∆u2 + 2σuv(u, v)∆u∆v + σvv(u, v)∆v2)

,

for ∆u and ∆v small. In view of (5.1)6

Q ≈ 12

(

σuu(u, v) · N ∆u2 + 2σuv(u, v) · N ∆u∆v + σvv(u, v) · N ∆v2)

= 12

(

L ∆u2 + 2M ∆u∆v + N ∆v2)

,

using the standard notation7

L = σuu(u, v) · N(5.3)

M = σuv(u, v) · NN = σvv(u, v) · N .

The quadratic form in the variables du and dv8

L(u, v) du2 + 2M(u, v) du dv + N (u, v) dv2

is called the second fundamental form.9

Example 1 Consider the plane σ(u, v) = a + up + vq, passing through10

the tip of vector a, and spanned by vectors p and q. Calculate σu(u, v) = p,11

σv(u, v) = q, σuu(u, v) = σuv(u, v) = σvv(u, v) = 0. Hence, L = M = N =12

0. The second fundamental form of a plane is zero.13

Example 2 Consider the paraboloid σ(u, v) =(

u, v, u2 + v2)

(the same14

as z = x2 + y2). Calculate15

σu(u, v) = (1, 0, 2u) ,16

σv(u, v) = (0, 1, 2v) ,17

σuu(u, v) = σvv(u, v) = (0, 0, 2) ,18

σuv(u, v) = (0, 0, 0) ,

Page 218: Lectures on Linear Algebra Philip Korman

218CHAPTER 7. APPLICATIONS TO CALCULUS AND DIFFERENTIAL GEOMETRY

1

σu(u, v)× σv(u, v) = (−2u,−2v, 1) ,2

N =σu(u, v)× σv(u, v)

||σu(u, v)× σv(u, v)|| =1√

4u2 + 4v2 + 1(−2u,−2v, 1) ,

3

L = σuu(u, v) · N =1√

4u2 + 4v2 + 1,

4

M = σuv(u, v) · N = 0,5

N = σvv(u, v) · N =1√

4u2 + 4v2 + 1.

The second fundamental form is1√

4u2 + 4v2 + 1

(

du2 + dv2)

.6

If γ(t) is a unit speed curve, recall that ||γ ′′(t)|| = κ, gives the curvature.7

Consider now a curve on the surface γ(t) = σ(u(t), v(t)), where (u(t), v(t))8

is a curve in the uv-plane of parameters. Again, we assume that γ(t) is a9

unit speed curve. Define the normal curvature as10

(5.4) κn = γ ′′(t) · N .

To motivate this notion, think of an object of unit mass moving on the curve11

γ(t) = σ(u(t), v(t)) on a surface S given by σ(u, v). Then γ ′′(t) gives force,12

and γ ′′(t) · N its normal component, or the force with which the object and13

the surface S act on each other. (This definition requires t to be the arc14

length parameter for standardization, so that your normal curvature is the15

same as mine.)16

Proposition 7.5.1 If L(u, v), M(u, v) and N (u, v) are the coefficients of17

the second fundamental form, and σ(u(t), v(t)) is a unit speed curve, then18

(5.5) κn = L(u, v)u′2(t) + 2M(u, v)u′(t)v′(t) + N (u, v)v′2(t) .

Proof: Using the chain rule calculate19

γ ′(t) = σuu′ + σvv′,

20

γ ′′(t) = (σu)′ u′ + σuu′′ + (σv)′ v′ + σvv

′′

= (σuuu′ + σuvv′)u′ + σuu′′ + (σvuu′ + σvvv

′) v′ + σvv′′

= σuuu′2 + 2σuvu′v′ + σvvv

′2 + σuu′′ + σvv′′ .

Page 219: Lectures on Linear Algebra Philip Korman

7.5. THE SECOND FUNDAMENTAL FORM 219

Then we obtain the formula (5.5) for κn = γ ′′(t) · N by using the definitions1

of L, M, N and (5.1). ♦2

Write the formula (5.5) in the form3

(5.6) κn = L(u, v)u′2(s) + 2M(u, v)u′(s)v′(s) + N (u, v)v′2(s)

to stress the fact that it uses the arc length parameter s (same as saying4

“unit speed curve”). What if t is an arbitrary parameter?5

Proposition 7.5.2 If E(u, v), F (u, v), G(u, v), L(u, v), M(u, v) and N (u, v)6

are the coefficients of the first and second fundamental forms, and σ(u(t), v(t))7

is any curve on the surface σ(u, v), then its normal curvature is8

(5.7) κn =L(u, v)u′2(t) + 2M(u, v)u′(t)v′(t) + N (u, v)v′2(t)

E(u, v)u′2(t) + 2F (u, v)u′(t)v′(t) + G(u, v)v′2(t).

Proof: Use9

du

ds=

du

dt

dt

ds=

dudtdsdt

,

and a similar formula dvds =

dvdtdsdt

in (5.6) to obtain10

(5.8) κn =L(u, v)u′2(t) + 2M(u, v)u′(t)v′(t) + N (u, v)v′2(t)

(

dsdt

)2 .

Dividing the first fundamental form by dt2 gives11

(

ds

dt

)2

= E(u, v)

(

du

dt

)2

+ 2F (u, v)du

dt

dv

dt+ G(u, v)

(

dv

dt

)2

.

Use this formula in (5.8) to complete the proof. ♦12

Observe that κn in (5.7) is a ratio of two quadratic forms with the ma-13

trices A =

[

L M

M N

]

in the numerator and B =

[

E F

F G

]

in the denome-14

nator. At a fixed pount in the (u, v)-plane, the direction vector (u′(t), v′(t))15

is just a pair of numbers, call them (ξ, η) and denote x =

[

ξη

]

. Then (5.7)16

takes the form17

(5.9) κn =Ax · xBx · x ,

Page 220: Lectures on Linear Algebra Philip Korman

220CHAPTER 7. APPLICATIONS TO CALCULUS AND DIFFERENTIAL GEOMETRY

a ratio of two quadratic forms.1

In case B = I , this ratio is the Rayleigh quotient, and its extreme values2

are determined by the eigenvalues and the eigenvectors of A. For the general3

case one needs to study generalized eigenvalue problems, and generalized4

Rayleigh quotients.5

Generalized Eigenvalue Problem6

If A and B are two n × n matrices, x ∈ Rn, and7

(5.10) Ax = λBx, x 6= 0

we say that x is a generalized eigenvector, and λ is the corresponding gen-8

eralized eigenvalue. Calculations are similar to the usual eigenvalues. Write9

(5.10) as10

(A − λB)x = 0 .

This homogeneous system will have non-trivial solutions provided that11

|A − λB| = 0 .

Let λ1, λ2, . . . , λn be the solutions of this characteristic equation. Then solve12

the system13

(A− λ1B)x = 0 .

for the generalized eigenvector corresponding to λ1, and so on.14

Assume that the matrix B is positive definite. We say that two vectors15

x, y ∈ Rn are B-orthogonal if16

Bx · y = 0 .

A vector x ∈ Rn is called B-unit if17

Bx · x = 1 .

Proposition 7.5.3 Assume that the matrix A is symmetric, and the matrix18

B is positive definite. Then the generalized eigenvalues are real, and the19

generalized eigenvectors corresponding to different generalized eigenvalues20

are B-orthogonal.21

Page 221: Lectures on Linear Algebra Philip Korman

7.5. THE SECOND FUNDAMENTAL FORM 221

Proof: Generalized eigenvalues satisfy1

B−1Ax = λx, x 6= 0.

The matrix B−1A is symmetric, therefore λ is real.2

Assume that y is another generalized eigenvector3

(5.11) Ay = µBy, y 6= 0 ,

and µ 6= λ. Take the dot product of (5.10) with y, and of (5.11) with x, and4

then subtract the results5

Ax · y − Ay · x = λBx · y − µBy · x .

Since Ax · y = x · Ay = Ay · x, we have zero on the left. Similarly, on the6

right By · x = Bx · y, and therefore7

0 = (λ − µ)Bx · y .

Since λ − µ 6= 0, it follows that Bx · y = 0. ♦8

The generalized Rayleigh quotientAx · xBx · x we shall consider only for 2×29

matrices that occur in the formula κn =Ax · xBx · x for the normal curvature.10

Proposition 7.5.4 Assume that the 2× 2 matrix A is symmetric, and the11

2×2 matrix B is positive definite. Let k1 < k2 be the generalized eigenvalues12

of13

Ax = kBx ,

and x1, x2 be the corresponding generalized eigenvectors. Then14

minx∈R2

Ax · xBx · x = k1 , achieved at x = x1 ,

15

maxx∈R2

Ax · xBx · x = k2 , achieved at x = x2 .

Proof: Recall that Bx1 · x2 = 0, and by scaling we may achieve that16

Bx1 · x1 = Bx2 · x2 = 1. Since x1 and x2 are linearly independent (a17

multiple of x1 belongs to k1, and not to k2), they span R2. Given any18

x ∈ R2, decompose19

x = c1x1 + c2x2 , with some numbers c1, c2 .

Page 222: Lectures on Linear Algebra Philip Korman

222CHAPTER 7. APPLICATIONS TO CALCULUS AND DIFFERENTIAL GEOMETRY

Then1

Bx · x = (c1Bx1 + c2Bx2) · (c1x1 + c2x2) = c21 + c2

2 .

Similarly,2

Ax · x = (c1Ax1 + c2Ax2) · (c1x1 + c2x2)

= (c1k1Bx1 + c2k2Bx2) · (c1x1 + c2x2) = k1c21 + k2c

22 .

Hence,3

minx∈R2

Ax · xBx · x = min

(c1,c2)

k1c21 + k2c

22

c21 + c2

2

= k1.

The minimum occurs when c1 = 1 and c2 = 0, or when x = x1, by the4

property of Rayleigh quotient (or by a direct argument, see exercises). ♦5

Exercises6

1. a. Find the second fundamental form for a surface of revolution σ(u, v) =7

(f(u) cosv, f(u) sinv, g(u)), assuming that f(u) > 0 and f ′2(u)+g′2(u) = 1.8

(This surface is obtained by rotating the unit speed curve x = f(u), z = g(u)9

in the xz-plane around the z-axis.)10

Answer. (f ′g′′ − f ′′g′) du2 + fg′ dv2.11

b. By setting f(u) = cosu, g(u) = sin u, find the second fundamental form12

for the unit sphere.13

Answer. du2 + cos2 u dv2.14

c. By setting f(u) = 1, g(u) = u, find the second fundamental form for the15

cylinder x2 + y2 = 1.16

Answer. dv2.17

2. Find the generalized eigenvalues and the corresponding eigenvectors,18

Ax = λBx.19

a. A =

[

−1 0

0 2

]

, B =

[

3 0

0 4

]

.20

Answer. λ1 = −13 , x1 =

[

1

0

]

; λ2 = 12 , x2 =

[

0

1

]

.21

b. A =

[

1 22 1

]

, B =

[

2 11 2

]

.22

3. Let B be positive definite.23

Page 223: Lectures on Linear Algebra Philip Korman

7.6. PRINCIPAL CURVATURES 223

a. Show that the vector x√Bx·x is B-unit, for x 6= 0.1

b. Assume that the vectors x1, x2, . . . , xn are B-orthogonal. Show that they2

are linearly independent.3

4. Let k1 < k2, and c1, c2 any numbers with c21 + c2

2 6= 0. Show that4

k1 ≤ k1c21 + k2c

22

c21 + c2

2

≤ k2 .

7.6 Principal Curvatures5

At any point on a regular surface σ(u, v), the tangent plane is spanned by6

the vectors σu(u, v) and σv(u, v), so that any vector t of the tangent plane7

can written as8

t = ξσu + ησv , with some numbers ξ, η .

Vectors σu and σv form a basis of the tangent plane, while (ξ, η) give the9

coordinates of t with respect to this basis. Let x =

[

ξ

η

]

. Then the normal10

curvature in the direction of t was shown in (5.9) to be κn = Ax·xBx·x , where11

the matrices A =

[

L MM N

]

and B =

[

E FF G

]

involve the coeffients of12

the second and the first fundamental forms. The minimum and the maxi-13

mum values of κn are called the principal curvatures. Let k1 < k2 be the14

generalized eigenvalues of15

Ax = kBx ,

and x1 =

[

ξ1

η1

]

, x2 =

[

ξ2

η2

]

be the corresponding generalized eigenvectors.16

According to the Proposition 5.1, the principal curvatures are k1 and k2.17

(We assume that k1 < k2.) The following vectors in the tangent plane18

t1 = ξ1σu + η1σv

t2 = ξ2σu + η2σv

are called the principal directions.19

Theorem 7.6.1 The principal directions are perpendicular.20

Page 224: Lectures on Linear Algebra Philip Korman

224CHAPTER 7. APPLICATIONS TO CALCULUS AND DIFFERENTIAL GEOMETRY

Proof: Using the definition of the coefficients of the first quadratic form1

t1 · t2 = Eξ1ξ2 + Fξ1η2 + Fη1ξ2 + Gη1η2

2

= [ξ1 η1]

[

E FF G

] [

ξ2

η2

]

= xT1 Ax2 .

On one hand3

xT1 Ax2 = xT

1 k2Bx2 = k2xT1 Bx2 .

On the other hand4

xT1 Ax2 = (Ax1)

T x2 = (k1Bx1)T x2 = k1x

T1 Bx2 .

We have two different expressions for t1 · t2. The only way to avoid a5

contradiction is to conclude that xT1 Bx2 = 0, so that t1 · t2 = 0. ♦6

Page 225: Lectures on Linear Algebra Philip Korman

Bibliography1

[1] R. Bellman, Stability Theory of Differential Equations. McGraw-Hill2

Book Company, Inc., New York-Toronto-London, 1953.3

[2] R. Bellman, Introduction to Matrix Analysis, 2nd ed. SIAM Philadel-4

phia 1997.5

[3] R. Bronson, Matrix Methods, Second Edition: An Introduction. Aca-6

demic Press, 1970.7

[4] B.P. Demidovic, Lectures on the Mathematical Theory of Stability (in8

Russian), Izdat. Nauka, Moscow 1967.9

[5] I.M. Gelfand, Lectures on Linear Algebra, Dover.10

[6] P. Korman, Lectures on Differential Equations. AMS/MAA Textbooks,11

54. MAA Press, Providence, RI, 2019.12

[7] A. Pressley, Elementary Differential Geometry, Springer Undergraduate13

Mathematics Series. Springer-Verlag London, Ltd., London, 2001.14

[8] G. Strang, Linear Algebra and Its Applications, 4th ed. Brooks/Cole,15

Cengage Learning, 2008.16

[9] D.J. Wright, Introduction To Linear Algebra, McGraw-Hill Education17

- Europe, 1999.18

[10] Yutsumura, Problems in Linear Algebra, Online:19

https://yutsumura.com/category/linear-algebra/20

225

Page 226: Lectures on Linear Algebra Philip Korman

Index

QR decomposition, 1381

LU decomposition, 572

adjugate matrix, 893

augmented matrix, 124

back-substitution, 85

basis, 626

block diagonal matrix, 53, 78, 797

calculating A−1, 498

Cauchy-Schwarz inequality, 124, 1919

characteristic equation, 9810

commuting matrices, 11811

complete forward elimination, 1712

complete set of eigenvectors, 10713

composition of transformations, 14914

congruent matrices, 162, 16515

coordinates, 64, 17116

Cramer’s rule, 91, 20217

determinant, 7518

diagonal matrix, 4219

diagonalization, 11620

diagonalizing matrix, 11621

dimension, 6322

eigenspace, 109, 14523

eigenvector basis, 11624

elementary matrices, 4825

exponential of a matrix, 188, 19226

first fundamental form, 21227

forward elimination, 828

Fredholm alternative, 13129

free variable, 1430

fundamental matrix, 19831

Gaussian elimination, 9, 20732

generalized eigenvalue problem, 22033

generalized eigenvector, 181, 19334

Gram determinant, 13535

Gram-Schmidt process, 136, 17036

Hadamard’s inequality, 14537

Hessian matrix, 20938

homogeneous system, 2739

identity matrix, 4240

indefinite matrix, 20941

inner product, 122, 17042

invariant subspace, 15443

inverse matrix A−1, 4644

inverse transformation, 15245

invertible matrix, 4646

Jacobian matrix and determinant, 21047

Jordan block, 19048

law of inertia, 16549

least squares, 13250

Legendre’s polynomials, 171, 17551

limit of a sequence of matrices, 12152

linear combination, 2053

linear dependence, 3354

linear independence, 3355

linear transformation, 117, 146, 17156

226

Page 227: Lectures on Linear Algebra Philip Korman

INDEX 227

lower triangular matrix, 56, 781

matrix of a linear transformation, 147,2

1723

matrix of a quadratic form, 1604

negative definite matrix, 2085

negative semi-definite matrix, 1686

nilpotent matrix, 547

norm, 122, 170, 1918

norm of a matrix, 1919

normal curvature, 21810

normal equations, 13211

normalization, 12412

null space, 6813

one-to-one transformation, 15214

onto, 15215

orthogonal basis, 12716

orthogonal complement, 12917

orthogonal matrix, 140, 14818

orthogonal polynomials, 17019

orthogonal set, 12620

orthogonal vectors, 12321

orthogonality to a subspace, 12822

orthonormal basis, 127, 14523

orthonormal set, 12624

permutation matrix, 5425

pivot, 1226

pivot variable, 1427

polynomial of a matrix, 10628

positive definite form, 16129

positive definite matrix, 15630

positive semi-definite matrix, 16831

power of a matrix, 44, 84, 11932

principal curvatures, 22333

principal directions, 22334

principal minors, 20635

product of matrices, 4136

product of matrix and vector, 2437

projection matrix, 14938

projection on a subspace, 12839

Pythagorean theorem, 13440

quadratic form, 16041

rank, 6942

rank theorem, 7143

Rayleigh quotient, 22044

rotation matrix, 14845

row echelon form, 1646

second fundamental form, 21747

self-adjoint transformation, 15448

similar matrices, 103, 11649

simultaneous diagonalization, 16450

singular matrix, 4751

size of a matrix, 2352

skew-symmetric matrix, 88, 15853

span, 2154

spectral decomposition, 15955

square matrix, 4156

square root of a matrix, 12157

standard basis, 6358

subspace, 6159

superposition principle, 17760

Sylvester’s Criterion, 20661

symmetric matrix, 153, 16062

trace, 10163

transpose of a matrix, 4464

triangle inequality, 12665

triangular matrix, 10166

trivial solution, 2867

unit vector, 12468

upper triangular matrix, 57, 7869

Vandermonde determinant, 8670

variation of parameters, 20171

vector of unknowns, 2572

Page 228: Lectures on Linear Algebra Philip Korman

228 INDEX

vector product, 921

vector space, 61, 1682

zero matrix, 44, 119, 1693

zero subspace, 624

zero vector, 275