topic 1 matrix
TRANSCRIPT
-
8/8/2019 Topic 1 Matrix
1/59
1
Topic 1
Matrix
-
8/8/2019 Topic 1 Matrix
2/59
2
451
687
253
What Is A Matrix?
A matrix is a rectangular collection
of like objects, usually numbers.W
eare primarily interested in matricesbecause they can be used to solvesystems of linear equations (covered
in week 3 & 4).
A =
-
8/8/2019 Topic 1 Matrix
3/59
3
What Is A Matrix? (cont.)
Other examples:
-
8/8/2019 Topic 1 Matrix
4/59
4
What Is A Matrix? (cont.)
Many notations to represent matrices:
In this class, we will use this notation:
-
8/8/2019 Topic 1 Matrix
5/59
5
451
687
5
The order AKA size of a matrix is thenumber of rows and columns.
the order of this example is 3 X 3
Read 3 by 3
Order Of A Matrix
row
column
row column
-
8/8/2019 Topic 1 Matrix
6/59
6
Square Matrix
A matrix is called a square matrix ifit has the same numbers of rows ascolumns.
3 X 3
it is a square matrix
4 X 3
it is NOT a square matrix
451
687
253
121
973
965
258
-
8/8/2019 Topic 1 Matrix
7/59
7
Column and Row Matrix
Column Matrix
A matrix th
ath
as only one column.
Row MatrixA matrix that has only one row.
3
2
8
726
-
8/8/2019 Topic 1 Matrix
8/59
8
Zero Matrix
A zero matrix is a matrix where all theelements are zeros.
000
000
000
-
8/8/2019 Topic 1 Matrix
9/59
9
Identity Matrix
The identity matrix is a matrix that hasone's on the diagonal, and zeros
everywhere else.
The identity matrix is usually written as"I".
100
010
001
-
8/8/2019 Topic 1 Matrix
10/59
10
Diagonal Of A Matrix
The diagonal of a matrix are theelements that have identical row andcolumn numbers
e.g. matrix 2 X 2, 3 X 3, etc.
A diagonal matrix is one that hasnon-zero elements only on thediagonal.
7
6
8
-
8/8/2019 Topic 1 Matrix
11/59
11**
**
***
******
**
**
*
000000
000000
00000
00000
00000
000000
000000
0000000
Block Diagonal Matrix
A block diagonal matrix is like a diagonalmatrix, except that elements exist in
the positions arranged as blocks.
(Where,
means a non-zero element.)
-
8/8/2019 Topic 1 Matrix
12/59
12
Band Matrix
A Band Matrix has numbers near thediagonal of the matrix, and nowhereelse. The width of the band is calledthe band width of the matrix.
***
****
*****
*****
*****
*****
****
***
00000
0000
000
000
000
000
0000
00000
-
8/8/2019 Topic 1 Matrix
13/59
13
Transpose Of A Matrix
The transpose of a matrix isobtained by interchanging the rowsand columns of matrix.
Example:
-
!
-
!
316
532
35
13
62
TA
A
-
!
-
!
205
614
123
261
012
543
TB
B
-
8/8/2019 Topic 1 Matrix
14/59
14
Orthogonal Matrix
If a matrix M has the property thatMTM = I than the matrix is called anOrthogonal matrix.
-
8/8/2019 Topic 1 Matrix
15/59
15
Symmetric Matrix
A symmetric matrix is a squarematrix equal to it's transpose, A = AT.
=B
=B
T
205
614
123
261
012
543
B is not symmetric matrix
653
542
321
653
542
321
-
-
=A
-
-
=A
A is a symmetric matrix
-
8/8/2019 Topic 1 Matrix
16/59
16
Triangular Matrix
A matrix with entries only below thediagonal, or with entries only abovethe diagonal, is called a (lower, upper)triangular matrix.
If the diagonal in those cases
consists only of 1's, then the matrixis unit triangular.
-
8/8/2019 Topic 1 Matrix
17/59
17
1
01
001
0001
00001
****
***
**
*
10000
1000
100
10
1
*
**
***
****
*****
****
***
**
*
0
00
000
0000
*
**
***
****
*****
0000
000
00
0
Triangular Matrix (cont.)
Upper Triangular Lower Triangular
Upper Unit Triangular Lower Unit Triangular
* Representsany numbers
-
8/8/2019 Topic 1 Matrix
18/59
18
Mathematical Operations
involving a Matrix and a ScalarWe can apply the following operationswhere one operand is a scalar (number) and
one is a matrix:Multiplication (x)
Division (/)
-
8/8/2019 Topic 1 Matrix
19/59
19
Mathematical Operations involving a
Matrix and aS
calar: Multiplication
Just multiply the scalar times eachelement in the matrix. This operationis commutative (the arrangement ofmatrixes can be switched)
-
8/8/2019 Topic 1 Matrix
20/59
20
Mathematical Operations involving a
Matrix and aS
calar : DivisionDivision only has meaning when amatrix is divided by a scalar.
Division of a scalar by a matrix is notdefined.
-
8/8/2019 Topic 1 Matrix
21/59
21
Mathematical Operations on Two
MatricesOnly three binary mathematicaloperations are defined:Addition
Subtraction
Multiplication
-
8/8/2019 Topic 1 Matrix
22/59
22
Mathematical Operations on Two
Matrices : AdditionAddition is only defined for twomatrices with the same order/size.Add the corresponding elements.Matrix addition is commutative.
-
8/8/2019 Topic 1 Matrix
23/59
23
Mathematical Operations on Two
Matrices : SubtractionSubtraction is just addition withunary inversion of the second matrix.
Subtraction is not commutative - theorder matters.Must be in the same order/size.
-
8/8/2019 Topic 1 Matrix
24/59
24
Mathematical Operations on Two
Matrices :MultiplicationMatrix multiplication is only definedwhen the second matrix has the samenumber of rows as the first matrixhas columns.
The resulting matrix has the same
number of rows as the first matrixand the same number of columns asthe second matrix.
-
8/8/2019 Topic 1 Matrix
25/59
25
Mathematical Operations on Two
Matrices :Multiplication (cont.)Here are some examples with matrices ofvarious orders.
Loosely speaking, multiplication is defined
when t
he middle numbers matc
h.
-
8/8/2019 Topic 1 Matrix
26/59
26
Basic Rules for Matrix
ArithmeticAddition, Subtraction, Multiplication & Division:
a and b are scalars and A, B, and C are matrices.
-
8/8/2019 Topic 1 Matrix
27/59
-
8/8/2019 Topic 1 Matrix
28/59
28
Example : Multiplication
Given A = and B = ,
Compute AB
-
320
124
-
5
3
1
-
8/8/2019 Topic 1 Matrix
29/59
29
Example : Multiplication
AB = =
= =
-
320
124
-
5
3
1
-
)5)(3()3)(2()1(0
)5)(1()3)(2()1(4
-
1560
564
-
21
3
-
8/8/2019 Topic 1 Matrix
30/59
30
Exercise 1
For the following matrices perform the indicatedoperation, if possible
1. A + B
2. B A
3. A + C
2 -4 -10 411 11 17 4
-2 -4 -4 013 -5 -3 14
Cant be done. Because of different sizes
-
8/8/2019 Topic 1 Matrix
31/59
31
Exercise 2
Compute
Given the matrices
15 55/2-7 -22/30 4
-
8/8/2019 Topic 1 Matrix
32/59
32
Exercise 3
Compute AC and CA for the following two matrices,if possible.
13 -53 17-56 -23 81
AC=
CA= cant be done, because of
the sizes
-
8/8/2019 Topic 1 Matrix
33/59
33
Exercise 4
Determine the transpose of these matrices:
-
8/8/2019 Topic 1 Matrix
34/59
34
The Identity Matrix
The identity matrix is a squarematrix with ones along the maindiagonal and zeros everywhere else.Here are the first few identitymatrices:
-
8/8/2019 Topic 1 Matrix
35/59
35
The Identity Matrix
The identity matrix can be multiplied by anysquare matrix and it leaves that matrix unchanged.
Multiplication by the identity matrix is alwayscommutative.
Here is an example.
-
8/8/2019 Topic 1 Matrix
36/59
36
Exercise 5
What is the answer?
Both will produceitself
-
8/8/2019 Topic 1 Matrix
37/59
37
The Determinant
The determinant is a scalar valueassigned to a square matrix.Therefore, non square matrices donot have a determinant.
The determinant of a (1x1) matrix is
just it's value, e.g. |5| = 5.
-
8/8/2019 Topic 1 Matrix
38/59
38
The Determinant of 2 X 2
The determinants of (2x2)
Example: Find the determinants for thegiven matrix.
Solution:
bcd,dc
ba
A!!
Adif
A24
12
-
-=
0
44
4122(det
!
!
!
-
)() -)(--A
-
8/8/2019 Topic 1 Matrix
39/59
39
The Determinant of 3 X 3
To find determinant of 3 X 3, copy the first andsecond columns of matrix to form fourth and fifth
columns.
the formula to calculate the determinant is
aei + bfg + cdh gec hf a - idb
hg
ed
ba
ihg
fed
cba
-
8/8/2019 Topic 1 Matrix
40/59
40
The Determinant of 3 X 3
Example: Find the determinants for thegiven matrix.
Solution: 013211
102
-=A
13
11
02
013
211
102
--
0
043100
010221113111320012det
=
-) --(-++=
))(()-)(()-)((-) -)(() +)(() +)((-A=
-
8/8/2019 Topic 1 Matrix
41/59
41
Exercise 6
Find the determinant of these matrices
A = 33
B = -467
C = 0
-
8/8/2019 Topic 1 Matrix
42/59
42
The Determinant & Singular
MatrixHigher order determinants are calculatedrecursively using the determinants of
smaller submatrices (discuss in Topic 3).A matrix with whose determinant has valuezero is called a singular matrix. If thedeterminant is not zero, the matrix is non-
singular.Exercise: Determine which matrices issingular and non-singular in the previousexercise A, B = non-singular
C = singular
-
8/8/2019 Topic 1 Matrix
43/59
43
The Matrix Inverse
DEFINITION:If A is a n x n matrix and an inverse of A is an n x nmatrix A-1, such that
AA-1= A-1A = I where I is the identity matrix.
then we call A invertible (non-singular) and we saythat A-1 is an inverse of the matrix A.
If we cant find such a matrix A-1 we call A asingular matrix (det A = zero).
-
8/8/2019 Topic 1 Matrix
44/59
44
The Matrix Inverse of 2 X 2
An inverse of 2 X 2 matrix:
dc
baA =if
ac-
b-d
bc-ad
1
=dc
ba
=A
1-
1-
then
-
8/8/2019 Topic 1 Matrix
45/59
45
The Matrix Inverse of 2 X 2
Example: Find the inverse of the given matrix (ifit exists)
Solution:
Find its determinant = ad - bc =1(7) (2)(3)
= 1
A
73
21=
13
27
13
27
1
1
-
-=
-
-=
1-
-
8/8/2019 Topic 1 Matrix
46/59
46
Exercise 7
1. Find the determinant of this matrix.Determine if the following matrix is singular,based from its determinant.
2
. Find th
e determinant of th
is matrixand find its inverse. .
determinant= 0,therefore issingular
determinant= -10,inverse = -1/2 -1/5
1/2 2/5
-
8/8/2019 Topic 1 Matrix
47/59
47
The Matrix Inverse of 3 X 3
If
Then steps to find A-1 are:1. Find determinant of 3X32. Find minor3. Find Cofactor4. Find Adjoint5. Replace results in formula
ihg
fed
cba
=A
adj(A)
A
1=A
1-
-
8/8/2019 Topic 1 Matrix
48/59
48
If then
Where
The Matrix Inverse of 3 X 3 :
Find Minor
ihg
fed
cba
=A
minorminorminor
minorminorminor
minorminorminor
minor
ihg
ed
cba
=A
fh-ei
ihg
fed
cba
aminor == fg-diihgfed
cba
bminor ==
eg-dh
ihg
fed
cba
cminor == ch-bi
ihg
fed
cba
dminor ==
-
8/8/2019 Topic 1 Matrix
49/59
49
The Matrix Inverse of 3 X 3 :
Find Minor
cgai
ihg
fed
cba
emin == bgah
ihg
fed
cba
fmin ==
cebf
ihg
fed
cba
gmin == cdaf
ihg
fed
cba
hmin ==
bdae
ihg
fed
cba
imin ==
-
8/8/2019 Topic 1 Matrix
50/59
50
The Matrix Inverse of 3 X 3 :
FindCofactor
add ve value to the circled elementin the minor matrix
minorminorminor
minorminorminor
minorminorminor
minor
ihg
fed
cba
=A
minorminorminor
minorminorminor
minorminorminor
i(h-
(f-e(d-
c(b-a
Cofactor
)
))
)
=
-
8/8/2019 Topic 1 Matrix
51/59
51
The Matrix Inverse of 3 X 3 :
Find AdjointTranspose the cofactor to obtain theadjoint matrix
minominomino
minominomino
minominomino
i(h-g
(f-e(d-
c(b-a
Cofacto
)
)))
=
minorminorminor
minorminorminor
minorminorminor
i(f-c
(h-(b-
(d-a
Adjoint
)
))
)
=
-
8/8/2019 Topic 1 Matrix
52/59
-
8/8/2019 Topic 1 Matrix
53/59
53
The Matrix Inverse of 3 X 3 :
ExampleSolution: Step 2: Find the Minor
326
101
011
-
-
-
=
minorminorminor
minorminorminor
minorminorminor
minor
ihgfed
cba
=
2202130
326
101
011
)=
-(-
)=
)()-(-
(=
-
-
-
=
mia
3636131
326
101
011
bmi ) =- () =)() -(-(=
-
-
-
=
-
8/8/2019 Topic 1 Matrix
54/59
54
The Matrix Inverse of 3 X 3 :
Example2026021
326
101
011
=-) =)() -((=
-
-
-
= -cmi
3032031
326
101
011
= --) = -)() -((=
-
-
-
= -dmi
3036031
326
101
011
=-) =)() -((=
-
-
-
= -emin
4626121
326
101
011
= --) =)(-) -(-(=
-
-
-
=minf
-
8/8/2019 Topic 1 Matrix
55/59
55
The Matrix Inverse of 3 X 3 :
Example10100
326
101
011
=-) =)() -((=
-
-
-
= 1-1-gmi
101101
326
101
011
= --) = -)() -((=
-
-
-
= 1-mi
10101
326
101
011
=(-) =)() -((=
-
-
-
= -1)1-imin
11-1
4-33-
23-2
ihg
fed
cba
min
min
min
min min min
min min min
min ==A
-
8/8/2019 Topic 1 Matrix
56/59
56
The Matrix Inverse of 3 X 3 :
ExampleSolution: Step 3: Find the Cofactor
minorminorminor
minorminorminor
minorminorminor
i(h-
(f-e(d-
c(b-a
Cofactor
)
))
)
=
111
433
232
111433
232
=
)- -)- -)- -
)- -
=C ofactor
-
8/8/2019 Topic 1 Matrix
57/59
57
The Matrix Inverse of 3 X 3 :
ExampleSolution: Step 4: Find the Adjoint
minominomino
minominomino
minominomino
i(f-c
(h-e(b-
g(d-a
djoint
)
))
)
=
142
133
132
111
433
232
Adjoint
T
==
-
8/8/2019 Topic 1 Matrix
58/59
58
The Matrix Inverse of 3 X 3 :
ExampleSolution: Step 5: Replace results in formula
adj(A)A
1=A
1-
142
133
132
142
133
132
1
1
---
---
---
=
-
=1-
-
8/8/2019 Topic 1 Matrix
59/59
Exercise 8
Compute the inverse of the following matrix:
15/154 -5/154 -6/773/22 -1/22 1/1126/77 17/77 10/77