You are on page 1of 47

MATH 211 Winter 2013 Lecture Notes

(Adapted by permission of K. Seyarth)

Sections 2.2 & 2.3

Sections 2.2 & 2.3

Page 1/1

Example
The linear system x1 + x2 x3 + 3x4 = 2 x1 + 4x2 + 5x3 2x4 = 1 x1 + 6x2 + 3x3 + 4x4 = 1 has coecient matrix A 1 A = 1 1 and constant matrix B , where 1 1 3 2 4 5 2 and B = 1 . 6 3 4 1

Using (matrix) addition and scalar multiplication, we can rewrite this system as 1 1 1 3 2 x1 1 + x2 4 + x3 5 + x4 2 = 1 1 6 2 4 1
Sections 2.2 & 2.3 An Alternate Form for a Linear System Page 2/1

This example illustrates the fact that solving a system of linear equations is equivalent to nding the coecients of a linear combination of the columns of the coecient matrix A so that the result is equal to the constant matrix B .

Sections 2.2 & 2.3

An Alternate Form for a Linear System

Page 3/1

Notation and Terminology


R: the set of real numbers. Rn : set of columns (with entries from R) having n rows. 1 2 1 6 4 R2 , 3 R3 . 0 R , 5 7 3 The columns of Rn are also called vectors or n-vectors. To save space, a vector is sometimes written as the transpose of a row matrix. T 1 1 0 3 R4

Sections 2.2 & 2.3

Notation and Terminology

Page 4/1

Denition (The Matrix-Vector Product)


Let A = A1 A2 An be an m n matrix with columns
T

any n-vector. A1 , A2 , . . . , An , and X = x1 x2 . . . xn The product AX is dened as the m-vector given by x1 A1 + x2 A2 + xn An , i.e., AX is a linear combination of the columns of A (and the coecients are the entries of X , in order). This means that if a system of m linear equations in n variables has the m n matrix A as its coecient matrix, the n-vector B as its constant matrix, and the n-vector X as the matrix of variables, then the system can be written as the matrix equation AX = B .

Sections 2.2 & 2.3

The Matrix-Vector Product

Page 5/1

Theorem (2.2 Theorem 1)


Every system of linear equations has the form AX = B where A is the coecient matrix, X is the matrix of variables, and B is the constant matrix. AX = B is consistent if and only if B is a linear combination of the columns of A. is a If A = A1 A2 . . . An , then X = x1 x2 . . . xn solution to AX = B if and only if x1 , x2 , . . . , xn are a solution to the vector equation x1 A1 + x2 A2 + xn An = B .
T

Sections 2.2 & 2.3

The Matrix-Vector Product

Page 6/1

Example
Let 2 1 0 2 1 1 1 and Y = A = 2 1 0 1 3 1 3 1 4 Compute AY . 1 Can B = 1 be expressed as a linear combination of the columns 1 of A? If so, nd a linear combination that does so.

Sections 2.2 & 2.3

The Matrix-Vector Product

Page 7/1

Example (continued)
1

1 0 2 1 0 AY = 2 2 + (1) 1 + 1 0 + 4 1 = 9 3 1 3 1 12 . To do this, Solve the system AX = B for X = x1 x2 x3 x4 put the augmented matrix A B in reduced row-echelon form. 1 1 0 0 1 1 0 2 1 1 7 2 1 0 1 1 0 1 0 1 5 7 3 3 1 3 1 1 0 0 1 1 7 Since there are innitely many solutions, simply choose a value for x4 . Taking x4 = 0 gives us 1 1 0 2 1 = 1 2 5 1 + 3 0 . 7 7 7 1 3 1 3
T

Sections 2.2 & 2.3

The Matrix-Vector Product

Page 8/1

Example (Example 5, p. 44.)


If A is the m n matrix of all zeros, then AX = 0 for any n-vector X . If X is the n-vector of zeros, then AX = 0 for any m n matrix A.

Sections 2.2 & 2.3

The Matrix-Vector Product

Page 9/1

Properties of Matrix-Vector Multiplication

Theorem (2.2 Theorem 2)


Let A and B be m n matrices, X , Y Rn be n-vectors, and k R be a scalar.
1 2 3

A(X + Y ) = AX + AY A(kX ) = k (AX ) = (kA)X (A + B )X = AX + BX

Sections 2.2 & 2.3

The Matrix-Vector Product

Page 10/1

Denition
Given a linear system AX = B , the system AX = 0 is called the associated homogeneous system.

Theorem (2.2 Theorem 3)


Suppose that X1 is a particular solution to the system of linear equations AX = B. Then every solution to AX = B has the form X2 = X1 + X0 for some solution X0 to the associated homogeneous system AX = 0.

How do we use this result?

Sections 2.2 & 2.3

The Associated Homogeneous System

Page 11/1

Example
The system of linear equations AX = B , with 2 1 3 3 4 A = 0 1 1 1 and B = 2 1 1 3 0 1 has solution 1 2s t 2+s t X = s t

1 2 2 1 = +s 0 1 0 0

1 + t 1 , 0 1

s , t R.

Sections 2.2 & 2.3

The Associated Homogeneous System

Page 12/1

Example (continued)
1 2 Furthermore, X1 = 0 is a 0 setting s = t = 0), while 2 1 X0 = s 1 0 particular solution to AX = B (obtained by

1 + t 1 , 0 1

s, t R

is the general solution, in parametric form, to the associated homogeneous system AX = 0. Example 7 (p. 46) is similar.
Sections 2.2 & 2.3 The Associated Homogeneous System Page 13/1

The Dot Product


Denition
The dot product of two n-tuples (a1 , a2 , . . . , an ) and (b1 , b2 , . . . , bn ) is the number (scalar) a1 b1 + a2 b2 + + an bn .

Theorem (2.2 Theorem 4)


Suppose that A is an m n matrix and that X is an n-vector. Then the i th entry of AX is the dot product of the i th row of A with X .

Example
Compute the product 2 1 0 2 1 1 2 1 0 1 1 3 1 3 1 4
Sections 2.2 & 2.3 The Dot Product Page 14/1

Denition
The n n identity matrix, denoted In is the matrix having ones on its main diagonal and zeros elsewhere, and is dened for all n 2. Example 11 (p. 49) shows that for any n-vector X , In X = X .

Denition
Let n 2. For each j , 1 j n, we denote by Ej the j th column of In .

Theorem (2.2 Theorem 5)


Let A and B be m n matrices. If AX = BX for every X Rn , then A = B.

Why?
Sections 2.2 & 2.3 The Dot Product Page 15/1

Problem
Find examples of matrices A and B, and a vector X = 0, so that AX = BX but A = B.

Sections 2.2 & 2.3

The Dot Product

Page 16/1

Matrix Transformations
Examples
In R2 , reection in the x -axis transforms In R2 , reection in the y -axis transforms These are examples of transformations of R2 . a b a b to to a . b a . b

Denition
A transformation is a function T : Rn Rm , sometimes written Rn Rm , and is called a transformation from Rn to Rm . If m = n, then we say T is a transformation of Rn .
T

What do we mean by function?


Sections 2.2 & 2.3 Matrix Transformations Page 17/1

Example (Dening a transformation by specifying its action.)


T : R3 R4 dened by a+b a b+c T b = ac c c b is a transformation.

Sections 2.2 & 2.3

Matrix Transformations

Page 18/1

Denition (Equality of Transformations)


Suppose S : Rn Rm and T : Rn Rm are transformations. Then S = T if and only if S (X ) = T (X ) for every X Rn .

Sections 2.2 & 2.3

Matrix Transformations

Page 19/1

Denition (Matrix Transformation)


Let A be an m n matrix. The transformation T : Rn Rm dened by T (X ) = AX for each X Rn is called the matrix transformation induced by A.

Example
In R2 , reection in the x -axis, which transforms matrix transformation because a b = 1 0 0 1 a b . a b to a , is a b

What about reection in the y -axis?


Sections 2.2 & 2.3 Matrix Transformations Page 20/1

Example
The transformation T : R3 R4 dened by a+b a b+c T b = ac c c b is a matrix transformation.

Why?

Because T is induced by the matrix 1 1 0 0 1 1 A= 1 0 1 0 1 1

Check!
Sections 2.2 & 2.3 Matrix Transformations Page 21/1

Example (Example 14, p. 51.)


R : R2 R2 2 denotes counterclockwise rotation about the origin through an angle of radians. Then a b R = . 2 b a Furthermore, R is a matrix transformation, as can be seen by the fact 2 that b 0 1 a = . a 1 0 b
2

Sections 2.2 & 2.3

Matrix Transformations

Page 22/1

Denition
R : R2 R2 denotes counterclockwise rotation about the origin through and angle of .

Problem
Suppose that a b R2 . Then R a b =?

Problem
Is R a matrix transformation?

Sections 2.2 & 2.3

Matrix Transformations

Page 23/1

Some other matrix transformations


1

If A is the m n matrix of all zeros, then the transformation induced by A, namely T (X ) = AX for all X Rn , is called the zero transformation from Rn to Rm , and is written T=0. If A is the n n identity matrix, then the transformation induced by A is called the identity transformation on Rn , and is written 1Rn . Example 15, p. 52: x -expansion, x -compression, y -expansion, and y -compression of R2 . Example 16, p. 52: an x -shear of R2 . From this you should be able to dene a y -shear of R2 , and nd the matrix that induces it. Exercise 11(b)(c), p. 54: reection in the line y = x and reection in the line y = x .

Sections 2.2 & 2.3

Matrix Transformations

Page 24/1

Not all transformations of R2 are matrix transformations.

Example
Let T : R2 R2 be dened by T (X ) = X + 1 1 for all X R2 .

Why is T not a matrix transformation?

Sections 2.2 & 2.3

Matrix Transformations

Page 25/1

2.3 Matrix Multiplication

Sections 2.2 & 2.3

Matrix Multiplication

Page 26/1

Matrix Multiplication

Denition (Product of two matrices.)


Let A be an m n matrix and B = B1 B2 Bk an n k matrix, whose columns are B1 , B2 , . . . , Bk . The product of A and B is the matrix AB = A B1 B2 Bk = AB1 AB2 ABk ,

i.e., the rst column of AB is AB1 , the second column of AB is AB2 , etc.

Sections 2.2 & 2.3

Matrix Multiplication

Page 27/1

Example
Let A and B be matrices, A= 1 0 3 2 1 1 1 1 2 and B = 0 2 4 1 0 0

Then AB has columns AB1 = 1 0 3 2 1 1 1 0 , AB2 = 1 1 0 3 2 1 1 1 0 3 2 1 1 and AB3 = 4 1 2 . 1 4 0


Matrix Multiplication Page 28/1

1 2 , 0

2 4 0

Thus, AB =
Sections 2.2 & 2.3

Theorem (2.3 Theorem 1)


Let A be an m n matrix, and B an n k matrix. Then A(BX ) = (AB )X for all k-vectors X Rk .

What does this mean? Why is this important?

Sections 2.2 & 2.3

Matrix Multiplication

Page 29/1

Another way to think about matrix multiplication


Theorem (2.3 Theorem 2)
Let A be an m n matrix and B and n k matrix. Then the (i , j )-entry of AB is the dot product of row i of A with column j of B.

Example
Use the above theorem to compute 1 0 3 2 1 1 1 1 2 0 2 4 1 0 0

Sections 2.2 & 2.3

Matrix Multiplication

Page 30/1

Denition (Compatibility for Matrix Multiplication)


Let A and B be matrices. In order for the product AB to exist, the number of rows in B must be equal to the number of columns in A. Assuming that A is an m n matrix, the product AB is dened if and only if B is an n k matrix for some k . If the product is dened, then A and B are said to be compatible for (matrix) multiplication. Given that A is m n and B is n k , the product AB is an m k matrix.

Sections 2.2 & 2.3

Compatibility for Matrix Multiplication

Page 31/1

Example (revisited)
As we saw earlier,
33 23 1 1 2 1 0 3 4 1 2 0 2 4 = 2 1 1 1 4 0 1 0 0 23

Note that the product


33 23 1 1 2 1 0 3 0 2 4 2 1 1 1 0 0

does not exist.

Sections 2.2 & 2.3

Compatibility for Matrix Multiplication

Page 32/1

Example
Let 1 2 0 and B = A = 3 1 4 Does AB exist? If so, compute it. Does BA exist? If so, compute it. 1 1 2 0 3 2 1 3

7 5 4 6 3 6 0 AB = 3 11 7 2 12

BA does not exist

Sections 2.2 & 2.3

Compatibility for Matrix Multiplication

Page 33/1

Example
Let G= 1 1 and H = 1 0

Does GH exist? If so, compute it. Does HG exist? If so, compute it. GH = HG = 1 0 1 0 1

In this example, GH and HG both exist, but they are not equal. They arent even the same size!

Sections 2.2 & 2.3

Compatibility for Matrix Multiplication

Page 34/1

Example
Let P= 1 0 2 1 and Q = 1 1 0 3

Does PQ exist? If so, compute it. Does QP exist? If so, compute it. PQ = 1 1 2 1 1 1 6 3

QP =

In this example, PQ and QP both exist and are the same size, but PQ = QP .

Sections 2.2 & 2.3

Compatibility for Matrix Multiplication

Page 35/1

Fact
The four previous examples illustrate an important property of matrix multiplication. In general, matrix multiplication is not commutative, i.e., the order of the matrices in the product is important.

Sections 2.2 & 2.3

Compatibility for Matrix Multiplication

Page 36/1

Example
Let U= 2 0 0 2 and V = 1 2 3 4

Does UV exist? If so, compute it. Does VU exist? If so, compute it. UV = 2 4 6 8

VU =

2 4 6 8

In this particular example, the matrices commute, i.e., UV = VU .

Sections 2.2 & 2.3

Compatibility for Matrix Multiplication

Page 37/1

Theorem (2.3 Theorem 3)


Let A, B, and C be matrices of appropriate sizes, and let k R be a scalar.
1 2 3 4 5 6

IA = A and AI = A where I is an identity matrix. A(BC ) = (AB )C (associative property) A(B + C ) = AB + AC (distributive property) (B + C )A = BA + CA (distributive property) k (AB ) = (kA)B = A(kB ) (AB )T = B T AT

Work through Example 7 on p. 61: simplifying algebraic expressions involving matrix multiplication.

Sections 2.2 & 2.3

Properties of Matrix Multiplication

Page 38/1

Elementary Proofs
Example
Let A and B be m n matrices, and let C be an n k matrix. Prove that if A and B commute with C , then A + B commutes with C .

Proof.
We are given that AC = CA and BC = CB . Consider (A + B )C . (A + B )C = AC + BC = CA + CB = C (A + B ) Since (A + B )C = C (A + B ), A + B commutes with C . Examples 8 and 9 on p. 61 are similar types of elementary proofs. Omit Example 10 on pp. 6162.
Sections 2.2 & 2.3 Properties of Matrix Multiplication Page 39/1

Block Multiplication
Example
Let A be an m n matrix. Let B be an n k matrix with columns B1 , B2 , . . . , Bk , i.e., B = B1 B2 Bk . This represents a partition of B into blocks in this example, the blocks are the columns of B . We can now write AB = A = B1 B2 AB1 AB2 Bk ABk

Here, the columns of AB , namely AB1 , AB2 , . . . , ABk , can be thought of as blocks of AB . If A is an m n matrix and B is an n k matrix, and if A and B are partitioned compatibly into blocks in some way, then the computation of the product AB may be simplied.
Sections 2.2 & 2.3 Block Multiplication Page 40/1

Example
2 1 1 0 A= 0 0 0 0 3 1 1 0 1 2 0 1 1 2 1 0 B= 0 5 1 1 0 0 1 0

Sections 2.2 & 2.3

Block Multiplication

Page 41/1

Example
2 1 1 0 A= 0 0 0 0 3 1 1 0 1 2 0 1 1 2 1 0 B= 0 5 1 1 0 0 1 0

Sections 2.2 & 2.3

Block Multiplication

Page 42/1

Example
2 1 1 0 A= 0 0 0 0 3 1 1 0 1 2 0 1 1 2 1 0 B= 0 5 1 1 0 0 1 0

Sections 2.2 & 2.3

Block Multiplication

Page 43/1

Example
2 1 1 0 A= 0 0 0 0 3 1 1 0 1 2 0 1 1 2 1 0 B= 0 5 1 1 0 0 1 0

Sections 2.2 & 2.3

Block Multiplication

Page 44/1

Example (continued)
Let 2 1 1 0 A= 0 0 0 0 and let 3 1 1 0 1 2 = 0 1 0 0 = 1 0

A1 A2 0 I2

1 2 1 0 B= 0 5 1 1 Then AB =

B1 0 B2 B3

A1 A2 0 I2

B1 0 B2 B3

Sections 2.2 & 2.3

Block Multiplication

Page 45/1

Example (continued)
AB = = = Now recall that
2 1 A= 0 0 1 0 0 0 3 1 1 0 1 2 = 0 1 A1 0 A2 I2 1 1 ,B = 0 1 2 0 5 1 0 0 = 1 0 B1 B2 0 B3

A1 A2 0 I2

B1 0 B2 B3

A1 B1 + A2 B2 A1 (0) + A2 B3 (0)B1 + I2 B2 (0)0 + I3 B3 A1 B1 + A2 B2 A2 B3 B2 B3

Now compute A1 B1 , A2 B2 and A2 B3 .


Sections 2.2 & 2.3 Block Multiplication Page 46/1

Example (continued)
A1 B1 = A2 B2 = 2 1 1 0 3 1 1 2 3 1 1 2 1 2 1 0 0 5 1 1 1 0 = 3 4 1 2 1 14 2 3 3 1

A2 B3 = Now,

AB =

A1 B1 + A2 B2 A2 B3 B2 B3

4 18 3 5 = 0 5 1 1

3 4 18 3 1 5 = 5 1 0 1 1 0

3 1 1 0

Sections 2.2 & 2.3

Block Multiplication

Page 47/1

You might also like