Matrice 1
Matrice 1
Engineering Mathematics A matrix is a rectangular array of elements. The elements can be symbolic
expressions or numbers. Matrix [A] is denoted by
MA1101
Introduction a11
a
a12
a 22
....... a1n
....... a 2 n
[ A]
21
a m1 am2 ....... a mn
What is a matrix?
Each matrix has rows and columns and this defines the size of the matrix. If a The matrix for the tire sales example could be denoted by the matrix [A] as
matrix [A] has m rows and n columns, the size of the matrix is denoted by m×n.
The matrix [A] may also be denoted by [A]mxn to show that [A] is a matrix with 25 20 3
m rows and n columns.
[ A] 5 10 15
6 16 7 7
Each entry in the matrix is called the entry or element of the matrix and is
denoted by aij where I is the row number and j is the column number of the
element. There are 3 rows and 4 columns, so the size of the matrix is 3×4. In
the above [A] matrix, a34 =27.
1
Special Types of Matrices
• Row Vector
• Column Vector
• Submatrix Row Matrix:
If a matrix [B] has one row, it is called a row vector [ B] [b1 b2 bn ]
• Square Matrix
and n is the dimension of the row vector.
• Upper Triangular Matrix
• Lower Triangular Matrix Column matrix:
If a matrix [C] has one column, it is called a column vector
Diagonal Matrix
c1
Identity Matrix
[C ]
Zero Matrix
c m
and m is the dimension of the vector.
Example Example
[ B ] [25 20 3 2 0] 25
[C ] 5
6
2
Square Matrix Example
3 0 0
[ A] 0 2.1 0
0 0 0
3
Upper Triangular Matrix Lower Triangular Matrix
A m×n matrix for which aij 0, i j is called an upper triangular matrix. That is, A m×n matrix for which aij 0, j i is called an lower triangular matrix. That is,
all the elements below the diagonal entries are zero. all the elements above the diagonal entries are zero.
Example Example
Give an example of an upper triangular matrix. Give an example of a lower triangular matrix.
10 7 0 1 0 0
[ A] 0 0.001 6 [A] 0.3 1 0
0 0 15005 0.6 2.5 1
A diagonal matrix with all diagonal elements equal to one is called an identity A matrix whose all entries are zero is called a zero matrix, ( aij 0for all i and j).
matrix, (aij 0, i j and aii 1 for all i).
1 0 0 0 0 0 0
0 1 0 0
[ A] [ A] 0 0 0 0 0 0
[B]
0 0 1 0 0 0 0 0 0 0
0 0 0 1
4
Non-square Matrix Example
Do non-square matrices have diagonal entries? What are the diagonal entries of
Yes, for a m×n matrix [A], the diagonal entries are a11 , a 22 ..., a k 1,k 1 , a kk where 3.2 5
k=min{m,n}. 6 7
[ A]
2.9 3.2
5.6 7.8
Two matrices [A] and [B] is the same (number of rows and columns are same for [A] and
[ C ] [ A] [ B ]
[B]) and aij=bij for all i and j.
where
cij a ij bij
What would make
2 3
[ A] Example 1
6 7 Add the following two matrices.
to be equal to
b 3 5 2 3 6 7 2
[ B] 11 [ A] [B]
6 b22
1 2 7 3 5 19
The two matrices [A] and [B] would be equal if b11=2 and b22=7.
5
Blowout r’us store has two store locations and , and their sales of tires are given by make
[C ] [ A] [ B] (in rows) and quarters (in columns) as shown below.
5 2 3 6 7 2
1 2 7 3 5 19 25 20 3 2 20 5 4 0
[A] 5 10 15 25 [B ] 3 6 15 21
5 6 2 7 3 2
6 16 7 27 4 1 7 20
1 3 2 5 7 19
11 9 1 where the rows represent the sale of Tirestone, Michigan and Copper tires respectively
and the columns represent the quarter number: 1, 2, 3 and 4. What are the total tire sales
4 7 26 for the two locations by make and quarter?
6
Matrix Subtraction Example 3
Two matrices [A] and [B ]can be subtracted only if they are the same size. The Subtract matrix [B ] from matrix [ A].
subtraction is then given by
[ D ] [ A] [ B ] 5 2 3
[A]
1 2 7
Where
6 7 2
d ij aij bij [B ]
3 5 19
[ D ] [ A] [ B ] Two matrices [A] and [B] can be multiplied only if the number of columns of [A] is
equal to the number of rows of [B] to give
5 2 3 6 7 2
1 2 7 3 5 19
(5 6) ( 2 7) (3 (2))
[C ] mn [ A] m p [ B ] pn
(1 3) ( 2 5) (7 19)
7
Matrix Multiplication Example 5
Given the following two matrices,
So how does one calculate the elements of [C ] matrix?
p
cij aik bkj
k 1 3 2
5 2 3
a i1b1 j a i 2 b2 j a ip b pj [ A] [B] 5 8
1 2 7 9 10
for each i 1, 2, , m and j 1, 2, , n
C AB
To put it in simpler terms, the i row and j th column of the [C ] matrix in
th
[C ] [ A][ B ] is calculated by multiplying the i row of [A] by the j th
column of [B ] .
c12 be found by multiplying the first row of [ A] by the second column of [B ], Similarly, one can find the other elements of [C ] to give
2
c12 5 2 3 8
10 52 56
[C ]
(5)( 2) ( 2)( 8) (3)( 10) 76 88
56
8
Blowout r’us store has two store locations and , and their sales of tires are given If [A] is a n n matrix and k is a real number, then the scalar product of
by make (in rows) and quarters (in columns) as shown below.
k and [A] is another n n matrix [B ], where bij k aij .
25 20 3 2 20 5 4 0
[A] 5 10 15 25 [B ] 3 6 15 21
6 16 7 27 4 1 7 20
where the rows represent the sale of Tirestone, Michigan and Copper tires
respectively and the columns represent the quarter number: 1, 2, 3 and 4.
2 .1 3 2
[ A]
2.1 3 2
2[ A] 2
5 1 6 5 1 6
2 2.1 2 3 2 2
2 5 2 1 2 6
Find 2[ A]
4 .2 6 4
10 2 12
9
Combining Linear Matrices
Example 8 (cont.)
If [ A1 ],[ A2 ],.....,[ Ap ] are matrices of the same size and k1 , k 2 ,....., k p are scalars,
then k1[ A1 ] k 2 [ A2 ] ........ k p [ Ap ]
If
is called a linear combination of
[ A1 ] 2[ A2 ] 0.5[ A3 ]
Example 8
[A 1 ], [ A2 ],....., [ A p ] 5 6 2 2 .1 3 2 0 2 .2 2
2 5 1 6 0.5 3 3.5 6
3 2 1
5 6 2 2.1 3 2 0 2.2 2
[ A1 ] , [ A2 ] , [ A3 ]
3 2 1 5 1 6 3 3.5 6 5 6 2 4.2 6 4 0 1.1 1
then find 3 2 1 10 2 12 1.5 1.75 3
10
Example 9 Example 9 (cont.)
[ B ][C ]
Illustrate the associative law of multiplication of matrices using
2 5 2 1
9 6 3 5
19 27
1 2 36 39
2 5 2 1
[ A] 3 5, [ B] , [C ] 3 5
9 6
0 2
1 2
19 27
[ A]([ B][C ]) 3 5
36 39
0 2
91 105
237 276
72 78
1 2 20 17 If [A][B] exists, number of columns of [A] has to be same as the number of rows
2 5 2 1
[ A][ B ] 3 5 ([ A][ B])[C ] 51 45 of [B] and if [B][A] exists, number of columns of [B] has to be same as the
9 6 3 5
0 2 18 12 number of rows of [A].
20 17 91 105 Now for [A][B]=[B][A], the resulting matrix from [A][B] and [B][A] has to be of
237 276
51 45 the same size. This is only possible if [A] and [B] are square and are of the same
72 78
18 12 size. Even then in general [A][B]≠[B][A].
11
Example 10 Example 10 (cont.)
Determine if
3 2 6 3
[ A][ B ]
6 3 3 2 [ B ][ A]
[A][B]=[B][A]
2 5 1 5 1 5 2 5
for the following matrices
15 27 14 1
1 29 16 28
6 3 3 2
[ A] , [ B ] 1 5
2 5 Therefore
[ A][ B ] [ B ][ A]
n m
n m
Let [ A] be a m n matrix. Then [B] is the transpose of the [ A] if bij a ijfor all i and j • Solution
That is, thei th row and thej th column element of[A] is the j th row and i th column • The transpose of[ A] is
element of [B] . Note[B] would be na m matrix. The transpose [ A] of is[ A]T 25 5 6
denoted by 20 10 16
AT
3 15 7
Example 1
2 25 27
Find the transpose of
• Note, the transpose of a row vector is a column vector and the transpose of a
column vector is a row vector.
25 20 3 2 • Also, note that the transpose of a transpose of a matrix is the matrix itself,
[ A] 5 10 15 25
6 16 7 27
A
T T
A A B T A T B T ; cA cA T
T
• that is,
• Also,
12
What is a symmetric matrix? Example 2
[ A] [ A] T
• Solution
21.2 3.2 6
• and is called a symmetric matrix. This is same as, if [A] T , [A] 3.2 21.5 8
then is a symmetric matrix.
6 8 9.3
is a symmetric matrix
• An n matrix is skew symmetric if aij a ji for i 1,..., n and j 1,..., n. • Give an example of a skew-symmetric matrix.
This is same as
• Solution
A AT . 0 1 2
1 0 5
2 5 0
• . Since only if
• all the diagonal elements of a skew-symmetric matrix have to be
zero.
13
n n
n n
What is the trace of a matrix?
Example 4
3
tr A a ii
• Solution i 1
17
a 22 det A 1
i j
aij M ij for any i 1, 2, , n
a 21 j 1
n
det( A) a11a22 a12 a 21 det A 1
i j
aij M ij for any j 1, 2, , n
i 1
• or
14
Example 6 Example 6 (cont.)
25 5 1 i 1
[A] 64 8 1 • Let in the formula
3
1 a11 M 11 1 a12 M 12 1 a 13 M 13
11 1 2 1 3
15
Example 6 (cont.) Example 6 (cont.)
• Also for i 1
C13 1 M 13
1 3
3
det A a1 jC1 j M 13
j 1
384
C11 1 M 11
11
M 12 84
80
C12 1 39
1 2
M 12
16