0% found this document useful (0 votes)
22 views16 pages

Matrice 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views16 pages

Matrice 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

What is a matrix?

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.

Row Vector Column Vector

Example Example

An example of a row matrix is as follows, An example of a column matrix is as follows,

[ B ]  [25 20 3 2 0] 25
[C ]   5 
 6 

2
Square Matrix Example

Give an example of a square matrix.


If the number of rows m a matrix is equal to the number of columns n of a matrix
[A], (m=n), then [A] is called a square matrix. The entries a11,a22,…, ann are
25 20 3 
[ A]   5 10 15
called the diagonal elements of a square matrix. Sometimes the diagonal of the
matrix is also called the principal or main of the matrix.
 6 15 7 
25 20 3 
[ A]   5 10 15 is a square matrix as it has the same number of rows and columns, that is, 3.
 
 6 15 7  The diagonal elements of [A] are a11  25, a 22  10, a33  7 .

Diagonal Matrix Example

An example of a diagonal matrix.

A square matrix with all non-diagonal elements equal to zero is called a  3 0 0


diagonal matrix, that is, only the diagonal entries of the square matrix can be [ A]  0 2.1 0
non-zero, (aij  0, i  j ). 0 0 0

Any or all the diagonal entries of a diagonal matrix can be zero.

3 0 0
[ A]  0 2.1 0
0 0 0

is also a diagonal matrix.

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

is an upper triangular matrix.


is a lower triangular matrix.

Identity Matrix Zero Matrix

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).

Some examples of zero matrices are,


An example of an identity matrix is,

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

The diagonal elements of [A] are a11  3.2 and a 22  7.

Example Matrix Addition


Two matrices and can be added only if they are the same size. The addition is then
shown as
When are two matrices considered to be equal?

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

Example 1 (cont.) Example 2

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?

G  Area of trapezoi d ABCD

Example 2 (cont.) Example 2 (cont.)


The answer then is,
[C ]  [ A ]  [ B ]
45 25 7 2 
25 20 3 2   20 5 4 0    8 16 30 46
  5 10 15 25   3 6 15 21
10 17 14 47 
 6 16 7 27   4 1 7 20

25  20 20  5 3  4 2  0 


So if one wants to know the total number of Copper tires sold in quarter 4 at the
  5  3 10  6 15  15 25  21 two locations, we would look at Row 3 – Column 4 to give c34  47.
 6  4 16  1 7  7  27  20

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 

Example 3 (cont.) Matrix Multiplication

[ 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 ] mn  [ A] m p [ B ] pn

 (1  3) ( 2  5) (7  19) 

If [A] is a m  p matrix and [B ] is a p  n matrix, the resulting matrix [C ]


1  5 5  is a m  n matrix.
 
 2  3  12

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

Find their product,


th

C   AB
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 ] .

Example 5 (cont.) Example 5 (cont.)

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

Example 6 Scalar Product Of a Constant And a Matrix

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.

Example 7 Example (cont.)

Given the matrix,


The solution to the product of a scalar and a matrix by the following method,

 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

[ A1 ]  2[ A2 ]  0.5[ A3 ]  9.2 10.9 5 


 
11.5 2.25 10

Binary Matrix Operations Binary Matrix Operations


Commutative law of addition Distributive Law
If [A] and [B] are m×n matrices, then
If [A] and [B] are m×n matrices, and [C] and [D] are n×p size matrices
[A]+[B]=[B]+[A]
[A]([C]+[D])=[A][C]+[A][D]
([A]+[B])[C]=[A][C]+[B][C]
Associative law of addition
and the resulting matrix size on both sides of the equation is m×r.
If [A], [B] and [C] are m×n, n×p, and p×r size matrices, respectively, then
[A]+([B]+[C])=([A] +[B])+[C]

Associative law of multiplication


If [A], [B] and [C] are all m×n, n×p and p×r size matrices, respectively, then
[A]([B][C])=([A][B])[C]
and the resulting matrix size on both sides of the equation is m×r.

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 

Example 9 (cont.) Is [A][B]=[B][A]?

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

What is the transpose of a matrix? Example 1 (cont.)

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 
AT  
 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 square matrix [ A] with real elements


aij where
 a ji i  1,2,..., n for j  1,2,..., n • Give an example of a symmetric matrix

[ 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

a12  a 21  3.2 , a13  a31  6 a23  a32  8

is a symmetric matrix

What is a skew-symmetric matrix? Example 3

• 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  AT .  0 1 2
  1 0  5
 
  2 5 0 

a12   a 21  1; a13  a31  2; a 23   a32   5


all the diagonal elements of a skew-
symmetric matrix have to be zero. • is skew-symmetric as a ii   a ii a ii  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

• The trace of a n  n matrix [ A] is the sum of the diagonal entries of [ A]


• Find the trace of
, that is,
15 6 7
[ A]   2  4 2
n
trA   a ii
i 1  3 2 6

3
tr A   a ii
• Solution i 1

 (15)  ( 4)  (6)

 17

How does one calculate the determinant of


Define the determinant of a matrix.
any square matrix?
• The determinant of a square matrix is a single unique real number • Let[A] be n  nmatrix. The minor of entrya is denoted byM and is defined as
ij ij

corresponding to[ Aa] matrix. For a matrix[ A] , determinant is denoted by A


the determinant of the ( n  1  ( n  1) submatrix of [A], where the submatrix is
A ) or A . So do not use and interchangeably obtained by deleting the i row and j column of the matrix [A] . The
th
det( th

• For a 2 x 2 matrix, determinant is then given by


a a12 
[ A]   11 n

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.)

• Find the determinant of • Solution


3
det  A    1
i j
a ij M ij for any i  1, 2, 3
j 1

 25 5 1 i 1
[A]   64 8 1 • Let in the formula
3

144 12 1 det A    1


1 j
a1 j M 1 j
j 1

  1 a11 M 11   1 a12 M 12   1 a 13 M 13
11 1 2 1 3

 a11 M 11  a12 M 12  a13 M 13

Example 6 (cont.) Example 6 (cont.)


25 5 1 25 5 1
M 11  64 8 1 M 13  64 8 1
144 12 1 144 12 1
8 1 64 8
 
12 1 144 12
 4  384
25 5 1
det( A)  a11 M 11  a12 M 12  a13 M 13
M 12  64 8 1
144 12 1  25 4   5 80  1 384
64 1  100  400  384

144 1
 84
 80

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
11

 M 11 det  A  a11C11  a 21C 21  a 31C 31


 4
 ( 25) 4  (5)80  (1) 384
C12   1 M 12
1 2
 100  400  384

  M 12  84

 80

Example 6 (cont.) Example 6 (cont.)

In terms of cofactors for j  2


C 32   1
3 2
M 32
3
det  A   a i 2 C i 2   M 32
i 1

C12   1  39
1 2
M 12

  M 12 det  A  a12 C12  a22 C22  a32C32


 80
 (5)80  (8) 119  (12)39
C 22   1
22
M 22
 400  952  468
 M 22  84
 119

16

You might also like