Download presentation
Presentation is loading. Please wait.
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 mn matrix n columns When m=n, A is called a square matrix.
4
Matrix Equality Definition Let A and B be two matrices.
A=B 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 mn matrices. Then: A + B = aij + bij, and A - B = aij - bij
6
Matrix Multiplication
Let A be a mk matrix, and B be a kn matrix,
7
Matching Dimensions To multiply two matrices, inner numbers must match: Otherwise, not defined. 23 34 24 matrix have to be equal 24 23 34
8
Multiplicative Properties
Note that just because AB is defined, BA may not be. Example If A is 34, B is 46, then AB=36, but BA is not defined (46 . 34). 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
34 23 a11b12 + a12b22 + a13b32 = c12 Takes 3 multiplications, and 2 additions for each element. This has to be done 24 (=8) times (since product matrix is 24). So 243 multiplications are needed. (mk) (kn) matrix product requires m.k.n multiplications.
10
Best Order? Let A be a 2030 matrix, B 3040, C 4010. (AB)C or A(BC)?
(2030 3040) 4010 32000 2030 (3040 4010) 18000 So, A(BC) is best in this case.
11
Identity Matrix The identity matrix has 1’s down the diagonal, e.g.:
For a mn matrix A, Im A = A In mm mn = mn nn
12
Inverse Matrix Let A and B be nn matrices.
If AB=BA=In then B is called the inverse of A, denoted B=A-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 nn 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 Since this is “or’d”, you can stop when you find a ‘1’
(Should be a ‘dot’) Since this is “or’d”, 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 nn square matrix A, the power matrix is defined as: A[r] = A A … A r times A[0] is defined as In.
23
Exercise 2.6
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.