Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March...

34
Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices: Introduction, Terminology, Notation 1.1 Introduction Consider the problem of solving the system of equations x - 2y =1 (1) -2x +3y = -2 (2) We can do this easily using substitution: use equation (1) to write x =1+2y, and then substitute this expression into equation (2) to get -2(1 + 2y)+3y = -2 , which is easily solved to find y = 0. Now substitute y = 0 into the equation x =1+2y to find x = 1. Therefore, the solution to the system of equations is x = 1 and y = 0. This works fine for this small system of two equations. What about something larger, say x - 2y + z = 1 -2x + 3y + z = -2 5x - 7y - 3z = -3 (3) We could again use substitution, but the problem is quite a bit harder (and messier) this time— try it! The situation gets worse the more equations we have. We would like a more systematic and organized approach to solving such problems, and fortunately, there is one. The system (3) can be expressed in the form 1 -2 1 -2 3 1 5 -7 -3 x y z = 1 -2 -3 . Each of the rectangular structures 1 -2 1 -2 3 1 5 -7 -3 , x y z and 1 -2 -3 is called a matrix , and there are methods of manipulating them to efficiently solve the system of equations. Our main focus will be the application of matrices (the plural of matrix) to solving systems of equations, but it should noted that matrices arise in many areas of science, economics and computing. 1.2 Terminology and Notation Matrices are denoted using bold uppercase letters. For example, let A = 1 -2 1 -2 3 1 5 -7 -3 . p. 1 of 34

Transcript of Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March...

Page 1: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

1 Matrices: Introduction, Terminology, Notation

1.1 Introduction

Consider the problem of solving the system of equations

x− 2y = 1 (1)

−2x + 3y = −2 (2)

We can do this easily using substitution: use equation (1) to write x = 1 + 2y, and then substitutethis expression into equation (2) to get

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

which is easily solved to find y = 0. Now substitute y = 0 into the equation x = 1 + 2y to findx = 1. Therefore, the solution to the system of equations is x = 1 and y = 0.

This works fine for this small system of two equations. What about something larger, say

x − 2y + z = 1−2x + 3y + z = −2

5x − 7y − 3z = −3

(3)

We could again use substitution, but the problem is quite a bit harder (and messier) this time—try it! The situation gets worse the more equations we have. We would like a more systematic andorganized approach to solving such problems, and fortunately, there is one. The system (3) can beexpressed in the form 1 −2 1

−2 3 15 −7 −3

xyz

=

1−2−3

.

Each of the rectangular structures

1 −2 1−2 3 1

5 −7 −3

,

xyz

and

1−2−3

is called a matrix , and

there are methods of manipulating them to efficiently solve the system of equations. Our mainfocus will be the application of matrices (the plural of matrix) to solving systems of equations, butit should noted that matrices arise in many areas of science, economics and computing.

1.2 Terminology and Notation

Matrices are denoted using bold uppercase letters. For example, let

A =

1 −2 1−2 3 1

5 −7 −3

.

p. 1 of 34

Page 2: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

Here A is a matrix of 3 rows and 3 columns , and we say A has size 3× 3. The size of a matrixis always stated as rows×columns, that is, rows first, columns second.

The entries or elements of A are the numbers. These are denoted by their position:

aij = entry in row i and column j of A .

For example, in our matrix A, a31 = 5 since the entry in row 3 and column 1 is 5. Notice again,when referring to position of entries: rows first, columns second. Similarly, a23 = 1 is the entry inrow 2 column 3. Also notice how we have used the lowercase letter “a” in aij to correspond withour choice of uppercase “A” used to represent the matrix. If instead we used B to represent ourmatrix, we would use bij to refer to the individual entries.

Now that we have some notation, let’s state the formal definition of a matrix:

Definition: A rectangular array of numbers consisting of m horizontal rows and n vertical columnsa11 a12 · · · a1n

a21 a22 · · · a2n...

.... . .

...am1 am2 · · · amn

is called an m × n matrix or matrix of size m × n. For entry aij, i is the row subscript, while j isthe column subscript.

A general matrix is sometimes denoted [aij]m×n.

Example: Let

B =

[1 6/7 4

1/2 −7 3

].

The size of B is 2× 3. A couple of entries of B are

b23 = 3 b21 = 1/2 .

Example: LetP =

[3 −4 π

].

P is called a row matrix or row vector . Here p11 = 3, p12 = −4 and p13 = π.�

Example: Let

Q =

02e

.

Q is called a column matrix or column vector . Here q11 = 0, p21 = 2 and p31 = e.�

p. 2 of 34

Page 3: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

Example: Construct [aij]4×3 if aij =1

i + j.

Solution: Let A = [aij]4×3. The entries of A are functions of their row and column positions; thatis, aij = 1/(i + j) is a function of the two variables i = 1, 2, 3, 4 and j = 1, 2, 3:

a11 =1

1 + 1=

1

2,

a12 =1

1 + 2=

1

3,

a13 =1

1 + 3=

1

4,

and so on. Computing all of the entries in this way we have

A =

1

1+11

1+21

1+31

2+11

2+21

2+31

3+11

3+21

3+31

4+11

4+21

4+3

=

12

13

14

13

14

15

14

15

16

15

16

17

.

1.3 Equality of Matrices

The matrices A = [aij] and B = [bij] are said to be equal if A and B have the same size andaij = bij for each i and j.

Example: [2 38 7

]=

[1 + 1 316/2 9− 2

]but [

22

]6=[

2 2]

since the sizes of are not the same:

[22

]is size 2× 1 while

[2 2

]is size 1× 2.

1.4 Transpose of a Matrix

Suppose A is an m × n matrix. The transpose of A, denoted AT, is the matrix of size n × mobtained by interchanging the rows and columns of A. For example, if

A =

1 −2 1−2 3 1

5 −7 −3

p. 3 of 34

Page 4: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

then

AT =

1 −2 5−2 3 −7

1 1 −3

.

Example: Let

B =

[1 2 34 5 6

] }size 2× 3

then

BT =

1 42 53 6

size 3× 2

Using this last example, notice that

(BT)T =

[1 2 34 5 6

]= B .

This turns out to be true in general: for any matrix A, (AT)T = A.

Example: Let

U =

2−1/2√

2

size 3× 1

thenUT =

[1 −1/2

√2] }

size 1× 3

1.5 Some Special Matrices

Zero Matrix The m × n zero matrix is the m × n matrix with all entries zero. For example,the 2× 3 zero matrix is

02×3 =

[0 0 00 0 0

].

Square Matrix A matrix with the same number n of rows and columns is called a square matrixof order n. For example,

A =

1 −2 1−2 3 1

5 −7 −3

Here the entries a11 = 1, a22 = 3, and a33 = −3 (reading from upper-left to lower-right) formthe main diagonal of A.

p. 4 of 34

Page 5: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

Diagonal Matrix A square matrix [aij]n×n with all entries not on the main diagonal equal to zerois called a diagonal matrix . That is, aij = 0 if i 6= j. For example 1 0 0

0 4 00 0 9

is a diagonal matrix, however 0 0 1

0 4 09 0 0

is not.

Upper Triangular Matrix A square matrix is called upper triangular if all entries below themain diagonal are zero, for example

A =

1 −2 10 3 10 0 −3

.

Lower Triangular Matrix A square matrix is called lower triangular if all entries above themain diagonal are zero, for example

A =

1 0 0−2 3 0

5 −7 −3

.

Triangular Matrix A matrix which is either upper or lower triangular.

2 Matrix Addition and Scalar Multiplication

Matrices inherit many of the properties of ordinary real numbers, including some of the operationsof arithmetic. Here we define two of these operations: addition of matrices, and the multiplicationof a matrix by a number, called scalar multiplication.

2.1 Matrix Addition

Let A = [aij]m×n and B = [bij]m×n. Then

A + B = [aij + bij]m×n .

That is, provided A and B are the same size, the matrix C = A + B is simply the m × n matrixformed by adding the corresponding entries of A and B: cij = aij + bij.

p. 5 of 34

Page 6: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

Example: Let

A =

[3 0 −24 3 1

], B =

[−11 1 12

7 −2 13

].

Then

A + B =

[3 + (−11) 0 + 1 (−2) + 12

4 + 7 3 + (−2) 1 + 13

]=

[−8 1 1011 1 14

].

Example: Let

A =

3 0−2 4

3 1

, 03×2 =

0 00 00 0

.

Then A + 03×2 = A as one would expect.�

This last example generalizes: matrices inherit the addition properties of the real numbers: formatrices A, B, C and 0m×n each of size m× n:

(i) A + B = B + A .

(ii) A + (B + C) = (A + B) + C .

(iii) A + 0m×n = A .

(iv) (A + B)T = AT + BT .

2.2 Scalar Multiplication

Let A = [aij]m×n be a matrix and let k be a real number (a scalar). Then C = kA is the matrixwith entry cij = kaij. For example, for

A =

[1 64 2

],

multiplication by the scalar 1/2 gives

1

2A =

1

2

[1 64 2

]=

[(1/2)(1) (1/2)(6)(1/2)(4) (1/2)(2)

]=

[1/2 3

2 1

].

Example: Let

A =

[13

], B =

[−3/2

7

].

p. 6 of 34

Page 7: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

Then

4A + 2B = 4

[13

]+ 2

[−3/2

7

]=

[4

12

]+

[−314

]=

[1

26

].

Like matrix addition, scalar multiplication inherits many of the multiplication rules of the ordinaryreal numbers. In the following, let k, k1 and k2 be scalars, and A and B be matrices of size m× n:

(i) k(A + B) = kA + kB .

(ii) (k1 + k2)A = k1A + k2A .

(iii) k1(k2A) = (k1k2)A .

(iv) 0A = 0m×n .

(v) k0m×n = 0m×n .

(vi) (kA)T = kAT .

2.3 Matrix Subtraction

Now that we have clearly defined matrix addition and scalar multiplication, the operation of sub-traction can be stated simply: if A and B are matrices of size m× n, then we define

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

Here are a few examples to put this all together:

Example: Solve

3

[xy

]−[

12

]= 12

[−1/2

3/4

]for

[xy

].

p. 7 of 34

Page 8: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

Solution:

3

[xy

]−[

12

]= 12

[−1/2

3/4

],

3

[xy

]−[

12

]=

[−6

9

],

3

[xy

]=

[12

]+

[−6

9

],

3

[xy

]=

[−511

],[

xy

]=

1

3

[−511

],[

xy

]=

[−5/311/3

].

Therefore

[xy

]=

[−5/311/3

].

Example: Let

A =

[3 −4 5−2 1 6

], B =

[1 4 24 1 2

], C =

[−1 1 3

2 6 −6

].

Compute 2(3C−A) + 2B.

Solution:

First, notice that A,B and C are all the same size, 2× 3 in this case, so addition is defined. So wehave

2 (3C−A) + 2B

=2

(3

[−1 1 3

2 6 −6

]+ (−1)

[3 −4 5−2 1 6

])+ 2

[1 4 24 1 2

]=2

([−3 3 9

6 18 −18

]+

[−3 4 −5

2 −1 −6

])+

[2 8 48 2 4

]=2

[−6 7 4

8 17 −24

]+

[2 8 48 2 4

]=

[−12 14 8

16 34 −48

]+

[2 8 48 2 4

]=

[10 22 1224 36 −44

]�

p. 8 of 34

Page 9: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

Problems for Sections 1 and 2

1. Let

Q =

1/3 6 −1/20 −13 1/70 0 −1

.

(i) State the size and order of Q.

(ii) State q21, q13, q33.

(iii) Is QT upper triangular, lower triangular, or neither?

2. Construct [aij]2×3 where aij = −2i + 3j.

3. Construct [bij]3×3 where bij = (−1)i+j(i2 + j2).

4. A matrix A is called symmetric if A = AT. Is the matrix of of Problem 3 symmetric?

5. Solve the matrix equation [2x 77 2y

]=

[y 77 y

].

6. Find all x for which [x2 + 2000x

√x2

x2 ln (ex)

]=

[2001 −x

2001− 2000x x

].

7. Let

A =

[2 1

3 −3

], B =

[−6 −5

2 −3

], C =

[−2 −1

−3 3

], 02×2 =

[0 0

0 0

].

Compute the following:

(i) 2A + 3(B + C) .

(ii) (1/2)A− 2(B + 2C) .

(iii) (B− 2AT)T .

(iv) −3(B− 202×2) + 0B .

8. Solve for x and y:

x

[32

]− y

[−4

7

]= 3

[24

].

9. Solve for x and y:

3

[xy

]− 3

[−2

4

]= 4

[6−2

].

10. Solve for x, y and z: 246

+ 2

xy

4z

=

−10−24

14

.

p. 9 of 34

Page 10: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

Answers to Problems for Sections 1 and 2

1. (i) size 3× 3; order 3.

(ii) q21 = 0, q13 = −1/2, q33 = −1.

(iii) QT is lower triangular.

2.

[1 4 7

−1 2 5

]

3.

2 −5 10

−5 8 −13

10 −13 18

4. Yes.

5. x = y = 0.

6. x = −2001.

7. (i)

[−20 −16

3 −6

].

(ii)

[21 29/2

19/2 −15/2

].

(iii)

[−10 0

−11 3

].

(iv)

[18 15

−6 9

].

8. x = 90/29, y = −24/29.

9. x = 6, y = 4/3.

10. x = −6, y = −14, z = 1.

3 Matrix Multiplication

3.1 Introduction

So far we have seen two algebraic operations with matrices, addition and scalar multiplication, andwe have also seen how the zero matrix plays a role in these operations similar to that of the zeroof the real number system. The properties of matrix addition and scalar multiplication are similarto those of the ordinary real numbers, and it is natural to ask how far these similarities extend. In

p. 10 of 34

Page 11: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

particular, is it possible the define the notion of multiplication of two matrices. The answer is yes,though matrix multiplication is not quite as straightforward as matrix addition.

3.2 Definition of Matrix Multiplication

Here’s the formal definition of matrix multiplication:

Definition: Let A = [aij]m×p and B = [bij]p×n. Then we define the product C = AB as the matrixwith entries

cij = ai1b1j + ai2b2j + ai3b3j + · · ·+ aipbpj .

Notice:

(i) ai1, ai2, ai3, . . . , aip are the elements of row i of A, while b1j, b2j, b3j, . . . , bpj are the elements ofcolumn j of B.

(ii) For matrix multiplication to be defined, the number of columns of A must be the same as thenumber of rows of B.

Example: Let

A =

2 3

1 −2

6 4

, B =

[3 7

−2 5

].

Then

AB =

(2)(3) + (3)(−2) (2)(7) + (3)(5)

(1)(3) + (−2)(−2) (1)(7) + (−2)(5)

(6)(3) + (4)(−2) (6)(7) + (4)(5)

=

0 29

−1 −3

10 62

.

Notice A is size 3× 2, B is size 2× 2, and the product AB is size 2× 2. �

The process of multiplying matrices can be described in terms of a certain type of product. Let Rand C be the row and column matrices

R =[

r11 r12 · · · r1p

]and C =

c11

c21

...

cp1

.

p. 11 of 34

Page 12: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

The expression r11c11 + r12c21 + · · · + r1pcp1 is called the dot product of R and C. Using thisnotion, the product of general matrices A and B can be described as the matrix C = AB whichhas entries

cij = dot product of row i of A and column j of B .

3.3 Examples of Matrix Multiplication

Here are some examples to illustrate the properties of matrix multiplication:

Example: [3

5

] [−2 13

]=

[−6 39

−10 65

].

Example: Let

A =

[1 7

2 9

]B =

[2 2

1 1

].

Then

AB =

[1 7

2 9

] [2 2

1 1

]=

[9 9

13 13

].

Now switch the order of the two factors:

BA =

[2 2

1 1

] [1 7

2 9

]=

[6 32

3 16

].

Notice in this last example: AB 6= BA. That is, matrix multiplication is not commutative. This isa very important difference between matrix multiplication and the ordinary multiplication of realnumbers that we are used to.

Example: Again let

A =

[1 7

2 9

]B =

[2 2

1 1

].

Then

(AB)T =

([1 7

2 9

] [2 2

1 1

])T

=

[9 9

13 13

]T

=

[9 13

9 13

].

Now compute

BTAT =

[2 1

2 1

] [1 2

7 9

]=

[9 13

9 13

].

p. 12 of 34

Page 13: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

In this last example we see that (AB)T = BTAT, and this turns out to be true in general.

Example: Let

A =

[1 7

2 9

]I2 =

[1 0

0 1

].

Then

AI2 =

[1 7

2 9

] [1 0

0 1

]=

[1 7

2 9

]= A .

Similarly,

I2A =

[1 0

0 1

] [1 7

2 9

]=

[1 7

2 9

]= A .

The matrix I2 in this last example is called the identity matrix of order 2. More generally:

Definition: The n× n matrix

In =

1 0 0 · · · 0

0 1 0 · · · 0

0 0 1 · · · 0

......

.... . .

...

0 0 0 · · · 1

is called the identity matrix of order n, or the n × n identity matrix . It has the propertythat

[aij]m×pIp = [aij]m×p ,

andIm[aij]m×p = [aij]m×p .

When the size of the identity matrix is understood it is often written simply as I. The letter Ishould not be used to represent any other matrix— it always means the identity matrix.

Comparing matrix algebra with that of the ordinary real numbers, notice that In plays the role ofthe number one.

As with matrix addition, matrix multiplication has many of the properties of ordinary multiplicationof real numbers. Let A, B, C be matrices, I the identity, and k a scalar. Then

(i) A(BC) = (AB)C .

(ii) A(B + C) = AB + AC .

(iii) (A + B)C = AC + BC .

(iv) k(AB) = (kA)B = (Ak)B = A(kB) = A(Bk) .

p. 13 of 34

Page 14: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

(v) AI = IA = A .

(vi) (AB)T = BTAT .

(vii) If p ≥ 1 is an integer, and A is square, Ap = AA · · ·A︸ ︷︷ ︸p factors

.

(viii) A0 = I .

In the properties listed above it is assumed that the matrices are of the sizes required for theoperations to be defined. Notice how the order of the multiplication is preserved in the expansionin (ii) and (iii). This is important since matrix multiplication is not commutative in general.

Example: Expand (A + B)(C + D).

(A + B)(C + D) = (A + B)C + (A + B)D

= AC + BC + AD + BD .

Example: Expand (A + B)(A−B).

(A + B)(A−B) = (A + B)A− (A + B)B

= A2 + BA−AB−B2 .

Notice in this last example, the terms BA and −AB cannot be canceled unless AB = BA, whichis not true in general.

Example: Let

A =

1 −2 1

−2 3 1

5 −7 −3

B =

2 13 5

1 8 3

1 3 1

.

Then

AB =

1 −2 1

−2 3 1

5 −7 −3

2 13 5

1 8 3

1 3 1

=

1 0 0

0 1 0

0 0 1

That is, AB = I. �

In this last example, B is called the inverse of A, and it is the only matrix with this property.You will find that BA = I in this case also. The inverse of A is written A−1. We will exploreinverses in more detail later.

Example: Let

A =

[1 2

2 4

]B =

[4 −6

−2 3

].

p. 14 of 34

Page 15: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

Then

AB =

[1 2

2 4

] [4 −6

−2 3

]=

[0 0

0 0

].

In this example we see another aspect of matrix multiplication which is unlike our experience withordinary multiplication: it is possible that AB = 02×2 even though A 6= 02×2 and B 6= 02×2.

Problems for Section 3

1. Let

A =

−3 −7 −6

−2 4 6

5 4 −5

B =

0 −2 5

4 2 −7

−4 −4 −4

C =

[2 4 4

2 −6 3

]D =

7 −7

−7 −6

−3 −3

Compute the following:

(i) AB

(ii) BD

(iii) 3I +3

2CD

(iv) DC(B−A)

(v) (A− 2I)(B + 3I)

(vi) (CA)T −ATCT

2. Express the system of equations

5x− 2y + z = −2, −x + 11y − 13z = 6, x + y + z = 1

using matrix multiplication.

3. Express the system of equations

−x + 3z = 5, 7x = 6y + 3, y − z = 0

using matrix multiplication.

4. For the diagonal matrices

A =

a 0 0

0 b 0

0 0 c

B =

x 0 0

0 y 0

0 0 z

,

compute AB and also BA. Notice anything?

p. 15 of 34

Page 16: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

5. Let

A =

−2

1

0

, B =[

3 −2 1]

Compute (AB)2 .

Solutions to Problems for Section 3

1. (i)

AB =

−4 16 58

−8 −12 −62

36 18 17

(ii)

BD =

−1 −3

35 −19

12 64

(iii)

3I +3

2CD =

−36 −75

141

2

45

2

(iv)

DC(B−A) =

357 −196 −903

384 222 −436

189 96 −231

(v)

(A− 2I)(B + 3I) =

−19 −1 30

−22 −10 −30

59 38 4

(vi)

(CA)T −ATCT = 03×2

2. 5 −2 1

−1 11 −13

1 1 1

x

y

z

=

−2

6

1

p. 16 of 34

Page 17: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

3. −1 0 3

7 −6 0

0 1 −1

x

y

z

=

5

3

0

4.

AB = BA =

ax 0 0

0 by 0

0 0 cz

5.

(AB)2 =

48 −32 16

−24 16 −8

0 0 0

4 Solving Systems of Equations by Reducing Matrices

4.1 Introduction

One of the main applications of matrix methods is the solution of systems of linear equations.Consider for example solving the system

2x− 3y = 2

−x + 2y = 1 .

As we observed before, this system can easily be solved using the method of substitution. Anothermore systematic method is that of reduction of matrices, the solution by a sequence of stepswhich can be carried out efficiently using matrices.

Before explaining the method in detail, the idea behind it is first illustrated by applying it to solvethe simple system above. In the following, we list on the left the steps of the solution applied tothe system of equations, and on the right we show how the corresponding steps can be written inmatrix form.

First, state the problem in matrix form:

1© 2x− 3y = 22© −x + 2y = 1

[2 −3 2−1 2 1

].

Now multiply the first equation by 1/2 to make the coefficient of x one:

1© x− 3

2y = 1

2© −x + 2y = 1

1−3

21

−1 2 1

.

p. 17 of 34

Page 18: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

Now add the first equation to the second:

1© x− 3

2y = 1

2© 1

2y = 2

1−3

21

01

22

.

Now multiply the second equation by 2:

1© x− 3

2y = 1

2© y = 4

1−3

21

0 1 4

.

Add 3/2 times the second equation to the first:

1© x = 7

2© y = 4

1 0 7

0 1 4

.

So we see that x = 7, y = 4 is the solution. Notice how the matrices at each step contain the sameinformation as the equations while dispensing with the variables.

We say that the system of equations (or the matrix) at each step is equivalent to the one beforeit, meaning that it contains the same information. Although the system of equations looks differentfrom step to step, each has the same solution x = 7, y = 4.

In the sections to follow we will describe in more detail the method of solving systems by reductionof matrices.

4.2 Some Terminology and Description of the Procedure

In this section we introduce some notation and terminology, describe the procedure used in theprevious section, and give some examples illustrating the method.

4.2.1 Augmented Coefficient Matrix

With reference to the system from the previous section

2x− 3y = 2−x + 2y = 1 ,

the matrix [2 −3−1 2

]p. 18 of 34

Page 19: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

is called the coefficient matrix . The matrix[2 −3 2−1 2 1

]is called the augmented coefficient matrix .

4.2.2 Elementary Row Operations

The operations performed on the augmented matrix in the first section are called elementary rowoperations . There are three types of elementary row operations:

(i) Interchanging two rows. The notation for this is Ri ↔ Rj, which means interchange rows iand j.

(ii) Multiplying a row by a nonzero constant. Notation: kRi, meaning multiply row i by theconstant k.

(iii) Adding k times one row to another. Notation: kRi +Rj, meaning add k times row i to row j,leaving row i unchanged. With this notation, the row being changed (row j) is listed second.

Performing elementary row operation on the augmented matrix of a system of equation does notalter the information contained in the augmented matrix. That is, the system represented by theaugmented matrix following the elementary row operation has the same solution as that before.This is an important point. If a matrix is obtained from another by one or more elementary rowoperations, the two matrices are said to be equivalent .

It should be pointed out that the notation for the elementary row operations is not universal, anddifferent books may use variations on the notation given here.

4.2.3 Reduced Form of a Matrix

The final augmented matrix in our problem had the form

[1 0 70 1 4

]; the

[1 00 1

]part of the

augmented matrix is said to be in reduced form (or reduced row echelon form). Althoughthe reduced form in this case turned out to be the identity matrix of order two, this need not bethe case. More generally, a matrix is said to be in reduced form if

(i) The first nonzero entry in a row (if any) is 1, while all other entries of the column containingthat 1 are 0;

(ii) The first nonzero entry in a row is to the right of the first nonzero entry in each row above;and

p. 19 of 34

Page 20: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

(iii) Any rows consisting entirely of zeros are at the bottom of the matrix.

The “first nonzero entry in a row” is called the leading entry of the row.

Example: The matrix

[2 00 1

]is not reduced, since the leading entry of the first row is 2, not 1.

Example: The matrix

1 0 00 1 30 0 0

is reduced since it meets the three conditions of being a reduced

matrix. �

4.2.4 Procedure for Reducing a Matrix

We next give the procedure for reducing a matrix, followed by an example. The description of theprocedure is slightly technical— it is best to work through several examples to understand how itworks.

To Put a Matrix in Reduced Form: Suppose a matrix has n rows.

(i) Set j = 1 (here j is a “row counter”, and so we are starting with the first row).

(ii) Rearrange rows j, j +1, . . . , n to that the leading entry of row j is positioned as far to the leftas possible.

(iii) Multiply row j by a nonzero constant to make the leading entry equal 1.

(iv) Use this leading entry of 1 to reduce all other entries in its column to 0 using elementary rowoperations.

(v) If any of rows j + 1, . . . , n contain nonzero terms, increase j by 1 and go to step (ii)

Here’s an example illustrating the steps of this procedure along with the notation for the elementaryrow operation:

Example: Reduce the matrix 0 4 1

2 −1 0

2 0 3

Solution:

p. 20 of 34

Page 21: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

Rearrange rows 1 to 3 so that the leading entry ofrow 1 is as far to the left as possible. In this case,interchange rows 1 and 3. (We could instead inter-change rows 1 and 2; either choice will work). This isstep (ii) in the procedure above.

R1 ↔ R3:

2 0 3

2 −1 0

0 4 1

Multiply row 1 by 1/2 to make leading entry 1. Thisis step (iii) in the procedure above.

(1/2)R1:

1 03

2

2 −1 0

0 4 1

Reduce all entries in the first column to zero usingelementary row operations. In this case, −2 timesrow 1 is added to row 2. This is step (iv) in theprocedure above.

(−2)R1 + R2:

1 03

2

0 −1 −3

0 4 1

Now on to step (v), which is to examine the remain-ing rows (2 and 3 in this case) to see if any containnonzero entries. Since the answer is yes, we returnto step (ii): rearrange the remaining rows 2 and 3 ifnecessary so that the leading entry of row 2 is as farto the left as possible. The leading term in each ofrows 2 and 3 is in column 2, so no need to interchangerows. On to step (iii) then: multiply row 2 by −1 tomake leading entry 1.

(−1)R2:

1 03

2

0 1 3

0 4 1

Now reduce all entries in the column containing theleading entry of row 2 (column 2 in this case): −4times row 2 is added to row 3. This is step (iv) in theprocedure.

(−4)R2 + R3:

1 03

2

0 1 3

0 0 −11

Now we’re on to step (v) again: examine remainingrows to see if any nonzero entries remain. Since “yes”,return to step (ii). Only one row remains, row 3, sothere are no rows to interchange. Multiply row 3 by−1/11 to make the leading entry 1. This is step (iii).

(−1/11)R3:

1 03

2

0 1 3

0 0 1

Using this new leading term of 1 in column 3, reducethe other entries in the column to 0. First, add −3times row 3 to row 2.

(−3)R3 + R2:

1 03

2

0 1 0

0 0 1

p. 21 of 34

Page 22: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

Finally, add −3/2 times row 3 to row 1. (−3/2)R3 + R1:

1 0 0

0 1 0

0 0 1

So the reduced form of the original matrix

0 4 1

2 −1 0

2 0 3

is the identity matrix of order 3.

4.2.5 An Example Illustrating the Method

Here’s an example which puts together everything so far:

Example: Solve

x− 3y = −11

4x + 3y = 9

Solution: Writing the system as an augmented matrix:[1 −3 −114 3 9

].

Now reduce:

(−4)R1 + R2 :

[1 −3 −110 15 53

]

(1/15)R2 :

[1 −3 −110 1 53/15

]

3R2 + R1 :

[1 0 −2/50 1 53/15

]This last augmented matrix as a system of equations says

1x + 0y = −2/5

0x + 1y = 53/15 ,

or in other words, x = −2/5, y = 53/15.�

p. 22 of 34

Page 23: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

4.3 More Examples

Example: Solve

x− 3y = 2

−x + 3y = 0

Solution: The augmented matrix is [1 −3 2−1 3 0

].

Now reduce:

R1 + R2 :

[1 −3 20 0 2

]This augmented matrix says

1x− 3y = 2

0x + 0y = 2 .

Look at the second of these equations: 0x+0y = 2; this can never be satisfied for any x and y, andso the original system of equations

x− 3y = 2

−x + 3y = 0

has no solution . This generalizes: if at any stage of reduction of the augmented matrix we havea row whose only nonzero term is in the last column, then the system has no solution.

Example: Solve

x + 3y + 2z = 1

x + y + 5z = 10

Solution: The augmented matrix is [1 3 2 11 1 5 10

].

Now reduce:

(−1)R1 + R2 :

[1 3 2 10 −2 3 9

]

(−1/2)R2 :

[1 3 2 10 1 −3/2 −9/2

]

(−3)R2 + R1 :

[1 0 13/2 29/20 1 −3/2 −9/2

]

p. 23 of 34

Page 24: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

Writing this as equations,

x + (13/2)z = 29/2

y − (3/2)z = −9/2 .

In this case we see there are not enough equations to determine a single solution to the system.Once a value is assigned to any one of the variables, the other two are determined, and there arein fact infinitely many solutions to the system. This infinite family of solutions is stated using aparameter . That is, let r be any real number. Then if z = r, then

y =−9

2+

3

2z =

3r − 9

2

and

x =29

2− 13

2z =

29− 13r

2.

and so the solution is

x =29− 13r

2, y =

3r − 9

2, z = r

where r is any real number. This is called a parametric solution with parameter r.�

Example: Solve

x1 + 3x2 = 6

2x1 + x2 = 7

x1 + x2 = 4

Solution: The augmented matrix is 1 3 62 1 71 1 4

.

Now for the reduction. In this example we carry out multiple elementary row operations in somesteps:

(−2)R1 + R2 :(−1)R1 + R3 :

1 3 60 −5 −50 −2 −2

(−1/5)R2 :

1 3 60 1 10 −2 −2

2R2 + R3 :(−3)R2 + R1 :

1 0 30 1 10 0 0

Therefore, x1 = 3 and x2 = 1.

p. 24 of 34

Page 25: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

Example: Solve

−3z + x = 2 + y

x = 1 + z − y

2x− 7/2 = 5z + y

Solution: First, put the system into a structured form so we can read off the coefficients:

x− y − 3z = 2

x + y − z = 1

2x− y − 5z = 7/2 .

The augmented matrix is 1 −1 −3 21 1 −1 12 −1 −5 7/2

.

Now reduce:

(−1)R1 + R2 :(−2)R1 + R3 :

1 −1 −3 20 2 2 −10 1 1 −1/2

(1/2)R2 :

1 −1 −3 20 1 1 −1/20 1 1 −1/2

R2 + R1 :(−1)R2 + R3 :

1 0 −2 3/20 1 1 −1/20 0 0 0

In this example we again find fewer equations than unknowns in the reduced augmented matrix,and so there are an infinite number of solutions. If z = r, then

y = −1

2− z = −1

2− r

and

x =3

2+ 2z =

3

2+ 2r .

The solution is therefore

x =3

2+ 2r, y = −1

2− r, z = r

where r is any real number.�

p. 25 of 34

Page 26: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

4.4 Summary

To conclude, we state in general terms the method of solving systems of equations by reducingmatrices, and summarize the cases which may arise as solutions:

Summary: Solving Systems of Equations by Reducing Matrices To solve a system of mequations in n unknowns

a11x1 + a12x2 + · · ·+ a1nxn = c1

a21x1 + a22x2 + · · ·+ a2nxn = c2

...

am1x1 + am2x2 + · · ·+ amnxn = cm

1. Set up the augmented coefficient matrixa11 a12 · · · a1n c1

a21 a22 · · · a2n c2...

... · · · ......

am1 am2 · · · amn cm

2. Put the coefficient matrix part

a11 a12 · · · a1n

a21 a22 · · · a2n...

... · · · ...am1 am2 · · · amn

of the augmented matrix into reduced form using elementary row operations.

3. State a conclusion:

case (i) If any row of the reduced augmented matrix has a nonzero entry in the last columnand zeros elsewhere, then there is no solution.

case (ii) If the reduced augmented matrix has fewer nonzero rows than unknowns, then thereare infinitely many solutions which may be stated using one or more parameters.

case (iii) The system has a unique solution which can be read from the reduced augmentedmatrix.

Problems for Section 4

Solve the following systems of equations using matrix reduction:

p. 26 of 34

Page 27: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

1.

4x + 2y = 11

9x− 3y = 6

2.

10x− 4y = −6

2x + 5y = −24

3.

9x + 12y = 21

−5x + 2y = 10

4.

3x− 9y = 24

−2x + 6y = 3

5.

8x− 2y − 6z = 2

8x + y − z = 5

4x + 2y + 4z = 10

6.

2x− 4y + 6z = −8

6x + 2y − 2z = 0

2x + 3y − 5z = 1

7.

2x− 4y − 3z = 3

x + 3y + z = −1

10x + 2y − 4z = 4

8.

2x + 2y + 2z = 2

x + 2y + 3z = 4

4x + 5y + 6z = 7

p. 27 of 34

Page 28: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

Solutions to Problems for Section 4

1. x = 3/2, y = 5/2

2. x = −63/29, y = −114/29

3. x = −1, y = 5/2

4. no solution

5. x = 3/2, y = −4, z = 3

6. x = −1, y = 6, z = 3

7. x = (r + 1)/2, y = (−r − 1)/2, z = r, where r is any real number

8. x = r − 2, y = 3− 2r, z = r, where r is any real number

5 Inverse Matrices

5.1 Introduction

In our earlier work on matrix multiplication, we saw the idea of the inverse of a matrix. That is,for a square matrix A, there may exist a matrix B with the property that AB = BA = I.

This is a useful concept, and gives us yet another method for solving systems of equations. Toillustrate, consider the simple system

2x− 5y = 6

x + 3y = 1 .

Instead of writing this as an augmented matrix, write this as a matrix equation using a product:[2 −51 3

] [xy

]=

[61

].

If we let A =

[2 −51 3

], X =

[xy

], and C =

[61

], then the equation we wish to solve is

AX = C .

If we knew A−1, we could solve this easily for the unknown X: (left) multiply both sides of theequation by A−1 to find

A−1(AX) = A−1C

(A−1A)X = A−1C

IX = A−1C

X = A−1C .

p. 28 of 34

Page 29: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

We see this is much like solving the simple equation ax = c for the unknown x where a and c arereal numbers.

In this section make precise the idea of a matrix inverse and develop a method to find the inverseof a given square matrix when it exists.

5.2 Definition

Suppose A is a square matrix of order n. A matrix B with the property that BA = I is called aninverse of A. If A has an inverse, it is called invertible , and we write A−1 to denote the inverse.

Some notes concerning this definition:

1. If A is invertible, then AA−1 = A−1A = I.

2. If a matrix A has an inverse, then the inverse is unique, so we may speak of the inverse A.

3. Not all square matrices have inverses.

5.3 Procedure for Finding the Inverse of a Matrix

Here we give a method for finding the inverse of a square matrix. We will see that this involvesnothing more than row reduction that we have seen before. For the purposes of the explanation2× 2 matrices are used, but the method extends to square matrices of any size.

Suppose A is invertible, where

A =

[a11 a12

a21 a22

],

and we wish to find a matrix B =

[b11 b12

b21 b22

]such that AB = I. That is, we want

[a11 a12

a21 a22

] [b11 b12

b21 b22

]=

[1 00 1

].

This matrix multiplication may be expressed as two systems of equations:

a11b11 + a12b21 = 1a21b11 + a22b21 = 0

anda11b12 + a12b22 = 0a21b12 + a22b22 = 1

If A is invertible, then there are values of b11, b12, b21, b22 which solve this system. In augmentedmatrix form these two systems of equations become[

a11 a12 1a21 a22 0

]and

[a11 a12 0a21 a22 1

].

p. 29 of 34

Page 30: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

Now, if A is invertible, again meaning that these two systems have unique solutions, then afterreduction by elementary row operations the result would be[

1 0 b11

0 1 b21

]and

[1 0 b12

0 1 b22

].

Here’s the key observation: the elementary row operations used to reduce A are the same for bothsystems! Therefore, we can do both reductions simultaneously using an augmented matrix of theform [

a11 a12 1 0a21 a22 0 1

]reduce−→

[1 0 b11 b12

0 1 b21 b22

].

Notice what this says: if A−1 exists, then A reduces to I and produces A−1 in the augmentedmatrix above. It also tells us something more: if A fails to reduce to I with this procedure, thenA−1 does not exist. So this procedure not only gives the inverse when it exists, it also tells us withcertainty when A−1 does not exist.

The procedure can be summarized very concisely: to find the inverse of the matrix A:[A I

] reduce−→[

I A−1]

.

If the original matrix A does not reduce to I in this procedure, then A−1 does not exist.

5.4 Examples

Example: Back to our problem from the beginning of this section: solve the system

2x− 5y = 6

x + 3y = 1 .

using matrix inverses.

Solution: Letting A =

[2 −51 3

], X =

[xy

], and C =

[61

], we wish to solve

AX = C .

To find A−1, first set up [2 −5 1 01 3 0 1

].

p. 30 of 34

Page 31: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

Now reduce:

R1 ↔ R2 :

[1 3 0 12 −5 1 0

]

(−2)R1 + R2 :

[1 3 0 10 −11 1 −2

]

(−1/11)R2 :

[1 3 0 10 1 −1/11 2/11

]

(−3)R2 + R1 :

[1 0 3/11 5/110 1 −1/11 2/11

]

Therefore, A−1 =

[3/11 5/11−1/11 2/11

], and so

X = A−1C

=

[3/11 5/11−1/11 2/11

] [61

]=

[23/11−4/11

].

Example: Let

A =

1 −2 1−2 3 1

5 −7 −3

.

Find A−1.

Solution: Set up 1 −2 1 1 0 0−2 3 1 0 1 0

5 −7 −3 0 0 1

.

p. 31 of 34

Page 32: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

Now reduce:

(2)R1 + R2 :(−5)R1 + R3 :

1 −2 1 1 0 00 −1 3 2 1 00 3 −8 −5 0 1

(−1)R2 :

1 −2 1 1 0 00 1 −3 −2 −1 00 3 −8 −5 0 1

(2)R2 + R1 :(−3)R2 + R3 :

1 0 −5 −3 −2 00 1 −3 −2 −1 00 0 1 1 3 1

(5)R3 + R1 :(3)R3 + R2 :

1 0 0 2 13 50 1 0 1 8 30 0 1 1 3 1

.

Since A reduced to I in the left hand side of the augmented matrix, the right hand side is A−1:

A−1 =

2 13 51 8 31 3 1

.

A check shows that indeed, AA−1 = A−1A = I.�

Example: Let

A =

1 3 32 1 11 1 1

.

Find A−1.

Solution: Set up 1 3 3 1 0 02 1 1 0 1 01 1 1 0 0 1

.

p. 32 of 34

Page 33: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

Now reduce:

(−2)R1 + R2 :(−1)R1 + R3 :

1 3 3 1 0 00 −5 −5 −2 1 00 −2 −2 −1 0 1

(−1/5)R2 :

1 3 3 1 0 00 1 1 2/5 −1/5 00 −2 −2 −1 0 1

(−3)R2 + R1 :(2)R2 + R3 :

1 0 0 −1/5 3/5 00 1 1 2/5 −1/5 00 0 0 −1/5 −2/5 1

.

Notice: the left hand side of the augmented matrix is now reduced, but it is not the 3× 3 identitymatrix. Therefore, A−1 does not exist.

Example: Find A−1 if A =

[a bc d

].

Solution: [a b 1 0c d 0 1

]

(1/a) R1 :

[1 b

a1a

0c d 0 1

]assuming a 6= 0

(−c)R1 + R2 :

[1 b

a1a

00 ad−bc

a− c

a1

](

a

ad− bc

)R2 :

[1 b

a1a

00 1 − c

ad−bca

ad−bc

]assuming ad− bc 6= 0

(− b

a

)R2 + R1 :

[1 0 d

ad−bc− b

ad−bc

0 1 − cad−bc

aad−bc

].

The conclusion is that if A =

[a bc d

]where ad− bc 6= 0, then A−1 =

1

ad− bc

[d −b−c a

]. Note

that even though we stated that a 6= 0 in the first row reduction step, the final result is valid evenif a = 0. This form for A−1 is very convenient in practice.

p. 33 of 34

Page 34: Math 152: Matrices in a Nutshell March 12, 2008 1 Matrices ...Math 152: Matrices in a Nutshell March 12, 2008 Here A is a matrix of 3 rows and 3 columns, and we say A has size 3×3.

Math 152: Matrices in a Nutshell March 12, 2008

Problems for Section 5

Find the inverses (if they exist) of the following matrices:

1. [3 25 3

]2. [

6 94 6

]3. [

4 −31 −2

]4. 3 1 0

1 1 11 −1 2

5. 1 −4 8

1 −3 22 −7 10

6. Use your answers to 1. and 3. to verify that (AB)−1 = B−1A−1.

Solutions to Problems for Section 5

1. [−3 2

5 −3

]2. Does not exist.

3. [2/5 −3/51/5 −4/5

]4. 3/8 −1/4 1/8

−1/8 3/4 −3/8−1/4 1/2 1/4

5. Does not exist.

p. 34 of 34