Download presentation
Presentation is loading. Please wait.
Published byNelson Barker Modified over 6 years ago
1
MATH 1046 Introduction to Matrices (Sections 3.1 and 3.2)
Alex Karassev
2
Matrices An m x n matrix is a rectangular array of numbers with m rows and n columns j-th column i-th row
3
Some examples Coefficient matrix of a linear system Distance matrix
Graph adjacency matrix Matrices in computer graphics Matrices in optimization problems Games
4
Example: distance matrix (in km)
North Bay Toronto Ottawa 340 360 450
5
Example: graph adjacency matrix
Timmins 1 North Bay 2 Ottawa 3 4 Toronto
6
Matrix operations Multiplication by scalars Addition and subtraction
Transpose
7
Multiplication by scalars
Example: distance matrices in km and mi All entries are multiplied by 1/1.6 km NB T O 340 360 450 mi NB T O 340/1.6 360/1.6 450/1.6
8
Multiplication by scalars
9
Addition First Basket Apples Pears Red 3 5 Green 4 6 Second Basket
1 Green 10 3 Total Apples Pears Red 3+1 5+0 Green 4+10 6+3
10
Addition
11
Matrix miultiplication
Example: 2 x 2 linear system Linear substitution
12
What system do we get in terms of y1 and y2?
Substitution: What system do we get in terms of y1 and y2?
13
New Coefficient Matrix:
14
Matrix multiplication: 2 x 2 case
15
Matrix multiplication: 2 x 2 case
Dot product:
16
Matrix multiplication: general case
Let A = (aij) be m x n matrix and B be n x k matrix The product AB = C = (cij) is an m x k matrix defined as follows cij = ai1 b1j + ai2 b2j+ ci3 b3j+…+ain bnj Note: cij is the dot product of i-th row of A and j-th column of B
17
Is it possible that AB≠BA?
18
Is it possible that AB≠BA?
Yes!
19
Square matrix A matrix is called square if m=n, i.e. the number of rows is the same as the number of columns A square matrix has the diagonal: all entries of the form aii
20
Zero Matrix and Identity Matrix
Zero matrix: an n x n matrix such that all entries are zeros Identity matrix: an n x n matrix such that all diagonal entries are 1, all other entries are 0
21
Properties: addition and multiplication by scalars
Addition of matrices and multiplication by scalars have the same properties as in the case of vectors or real numbers: (A+B)+C=A+(B+C) A+B = B+A A+O = A If -A = (-1)+A then A+(-A) = O (cd)A= c(dA) 1A = A (c+d)A = cA + dA c(A+B) = cA +cB
22
Properties: matrix multiplication
Assuming the dimension of matrices allow to perform the operations, we have the following: (AB)C=A(BC) A(B+C)= AB+AC (B+C)A= BA+CA IA = A I = A OA = AO = O (cA)B= A (cB) = c(AB)
23
Powers For a square matrix A, define Ak = A A … A (product of A with itself k times) Question: Is it possible to have A2 = O for a non-zero A?
24
Yes!
25
Scalar matrices Matrix A is called scalar if A = aI for some real number a Exercise Prove that for a scalar n x n matrix A and for any n x n matrix B we have AB= BA = aB Prove (at least for 2 x 2 case) that in fact for an arbitrary square matrix A we have AB= BA for any B if and only if A is scalar
26
Matrix Transpose AT = B such that bij = aji
If A is m x n matrix AT is n x m matrix If v is a row vector vT is a column vector, and vice versa In general: columns of AT are rows of A rows of AT are columns of A For a square matrix A this can be viewed as a flipping with respect to the diagonal:
27
Properties of transpose operation
(AT)T = ? (cA) T= ? (A+B)T = ? (AB)T = ? (Ak)T= ?
28
Properties of transpose operation
(AT)T = A (cA) T=cAT (A+B)T = AT+ BT (AB)T =BTAT (Ak)T= (AT) k Note: in general AAT ≠ATA (exercise: find an example!); square matrices that commute with its transpose are called normal
29
Symmetric and skew-symmetric matrices
A square matrix is called Symmetric if AT = A Examples: distance matrix, adjacency matrix Skew-symmetric (or antisymmetric) if AT = -A Examples: matrices of some games
30
Symmetric and Skew-symmetric matrices
(A+AT)T= AT + A = A + AT (AAT)T=(AT)TAT =AAT A+AT and AAT are symmetric for any square A (A-AT)T=AT - A = -(A - AT) A-AT is skew-symmetric for any square A Note: for any square matrix A we have A=1/2(A+AT) + 1/2 (A-AT)
31
Symmetric matrices: Exercise
Give an example of two symmetric 2x2 matrices whose product is not symmetric Prove that the product of two symmetric square matrices A and B is symmetric if and only if AB = BA
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.