Matrices - PowerPoint PPT Presentation

About This Presentation
Title:

Matrices

Description:

Matrices MSU CSE 260 Outline Introduction Matrix Arithmetic: Sum, Product Transposes and Powers of Matrices Identity matrix, Transpose, Symmetric matrices Zero-one ... – PowerPoint PPT presentation

Number of Views:340
Avg rating:3.0/5.0
Slides: 24
Provided by: Billmc65
Learn more at: http://www.cse.msu.edu
Category:

less

Transcript and Presenter's Notes

Title: Matrices


1
Matrices
  • MSU CSE 260

2
Outline
  • Introduction
  • Matrix Arithmetic
  • Sum, Product
  • Transposes and Powers of Matrices
  • Identity matrix, Transpose, Symmetric matrices
  • Zero-one Matrices
  • Join, Meet, Boolean product
  • Exercise 2.6

3
Introduction
Definition A matrix is a rectangular array of
numbers.
element in ith row, jth column
Also written as A?aij?
m rows
m?n matrix
n columns
When mn, A is called a square matrix.
4
Matrix Equality
  • Definition Let A and B be two matrices.
  • AB if they have the same number of rows and
    columns, and every element at each position in A
    equals element at corresponding position in B.

5
Matrix Addition, Subtraction
Let A ?aij? , B ?bij? be m?n matrices.
Then A B ?aij bij?, and A - B ?aij -
bij?
6
Matrix Multiplication
Let A be a m?k matrix, and B be a k?n matrix,
7
Matching Dimensions
To multiply two matrices, inner numbers must
match
Otherwise, not defined.
2?3 3?4
2?4 matrix
have to be equal
2?4
2?3
3?4
8
Multiplicative Properties
Note that just because AB is defined, BA may not
be. Example If A is 3?4, B is 4?6, then AB3?6,
but BA is not defined (4?6 . 3?4). Even if both
AB and BA are defined, they may not have the same
size. Even if they do, matrices do not commute.
9
Efficiency of Multiplication
3?4
2?3
  • a11b12 a12b22 a13b32 c12
  • Takes 3 multiplications, and 2 additions for each
    element.
  • This has to be done 2?4 (8) times (since product
    matrix is 2?4). So 2?4?3 multiplications are
    needed.
  • (m?k) (k?n) matrix product requires m.k.n
    multiplications.

10
Best Order?
Let A be a 20?30 matrix, B 30?40, C 40?10. (AB)C
or A(BC)?
(20?30 30?40) 40?10
32000
20?30 (30?40 40?10)
18000
So, A(BC) is best in this case.
11
Identity Matrix
The identity matrix has 1s down the diagonal,
e.g.
For a m?n matrix A, Im A A In
m?m m?n m?n n?n
12
Inverse Matrix
  • Let A and B be n?n matrices.
  • If ABBAIn then B is called the inverse of A,
    denoted BA-1.
  • Not all square matrices are invertible.

13
Use of Inverse to Solve Equations
Please note that a-1j is NOT necessarily (aj)-1.
14
Transposes of Matrices
Flip across diagonal
Transposes are used frequently in various
algorithms.
15
Symmetric Matrix
A is called symmetric.
is symmetric. Note, for A to be symmetric, is has
to be square.
is trivially symmetric...
16
Examples
17
Power Matrix
  • For a n?n square matrix A, the power matrix is
    defined as
  • Ar A ? A ? ? A
  • r times
  • A0 is defined as In.

18
Zero-one Matrices
  • All entries are 0 or 1.
  • Operations are ? and ?.
  • Boolean product is defined using
  • ? for multiplication, and
  • ? for addition.

19
Boolean Operations
Terminology is from Boolean Algebra.Think join
is put together, like union, and meet is
where they meet, or intersect.
20
Boolean Product
(Should be a dot)
Since this is ord, you can stop when you
find a 1
21
Boolean Product Properties
  • In general, A ? B ? B ? A
  • Example

22
Boolean Power
  • A Boolean power matrix can be defined in exactly
    the same way as a power matrix. For a n?n square
    matrix A, the power matrix is defined as
  • Ar A ? A ? ? A
  • r times
  • A0 is defined as In.

23
Exercise 2.6
Write a Comment
User Comments (0)
About PowerShow.com