Matrix Multiplication Matrix Multiplication via Matrix-Vector Mult - - PowerPoint PPT Presentation

matrix multiplication matrix multiplication via matrix
SMART_READER_LITE
LIVE PREVIEW

Matrix Multiplication Matrix Multiplication via Matrix-Vector Mult - - PowerPoint PPT Presentation

Matrix Multiplication Matrix Multiplication via Matrix-Vector Mult Defn. If matrix A is m n and matrix B is r s , then for the product AB to be valid it must be that n = r . If valid, the product AB has size m s . The columns of the


slide-1
SLIDE 1

Matrix Multiplication

slide-2
SLIDE 2

Matrix Multiplication via Matrix-Vector Mult

Defn. If matrix A is m×n and matrix B is r×s, then for the product AB to be valid it must be that n = r. If valid, the product AB has size m×s. The columns of the product are the results

  • f multiplying A by the columns of B.

That is, AB =

  • Ab1 Ab2 · · · Abs
  • where bj is the jth column of B.

matOpsTWO: 2

slide-3
SLIDE 3

Example of Matrix Multiplication

The product of a 2 × 3 and 3 × 4 matrix is a 2 × 4 matrix: 1 2 −1 0 3 −2

  3 1 −1 5 −2 0 3 −4 1 −2 2 −1    = −2 3 3 −2 −8 4 5 −10

  • An example detail: the 3rd column of the result

is given by −

  • 1
  • + 3
  • 2

3

  • + 2
  • −1

−2

  • =
  • 3

5

  • .

matOpsTWO: 3

slide-4
SLIDE 4

Formula for Entry in Product

Note (AB)ij =

  • k

aikbkj That is, to calculate entry in row i and column j of the product, look at row i of the first matrix and column j of the second matrix; then multi- ply corresponding entries and add.

3 −2 −1 3 2 5 (0 × −1) + (3 × 3) + (−2 × 2) =

matOpsTWO: 4

slide-5
SLIDE 5

Matrix Multiplication is Associative

Fact. Brackets don’t matter. For example (AB)C = A(BC) (and the one prod- uct is valid whenever the other one is).

matOpsTWO: 5

slide-6
SLIDE 6

Matrix multiplication is not Commutative

Fact. Order matters. There is no guarantee that (and it is unlikely that) AB = BA. Indeed, the one product might be valid when the

  • ther one is not.

matOpsTWO: 6

slide-7
SLIDE 7

The Identity Matrix

  • Defn. The identity matrix In is the n×n diag-
  • nal matrix with 1’s on the diagonal. (We some-

times write just I.) Its columns are the vectors ei: these have 0’s in every position except for a 1 in the ith position. If A is a square matrix, then IA = AI = A, where I is the identity matrix of the same size.

matOpsTWO: 7

slide-8
SLIDE 8

Matrix Powers

We use Ap to mean the product of p copies of A. (This needs A to be square.)

matOpsTWO: 8

slide-9
SLIDE 9

Transpose and Products

Fact. (AB)T = BTAT Note that the order is swapped!

matOpsTWO: 9

slide-10
SLIDE 10

Elementary Row Operations Revisited

  • Fact. Each elementary row operation is equiv-

alent to multiplying on the left by a matrix called an elementary matrix.

matOpsTWO: 10

slide-11
SLIDE 11

Summary

If matrix A is m × n and matrix B is r × s, then product AB is valid if n = r and has size m × s. Each column of AB results from multiplying A by the column of B. That is, (AB)ij =

k aikbkj

Matrix multiplication is associative but not com- mutative: brackets don’t matter but order does.

matOpsTWO: 11

slide-12
SLIDE 12

Summary (cont)

The identity matrix is a diagonal matrix with 1’s on the diagonal. Multiplying by the iden- tity leaves a matrix unchanged. We use Ap to mean the product of p copies of A. Each elemen- tary row operation is equivalent to multiplying

  • n the left by an elementary matrix.

matOpsTWO: 12