Unit 1 - Matrices
Unit 1 - Matrices
Unit 1: MATRICES
Matrix
A matrix of m rows and n columns (mxn) is an ordered table of numbers with the form:
Example: 2 3 0 1
A 2
3 1 0
A M 3x4
1 1 0 0
If the matrix has the same number of rows and columns, it is called square matrix.
1 2 3
1
A 0 1 M
3 1
3
9 5 3
If the matrix has only a row, it is called row vector or row matrix. If it has only a column, it is
called column vector or column matrix.
One matrix equals another matrix if they have the same dimension and the same terms
A, B M m xn ; A B a ij b ij i 1, 2 , ..... m ; j 1, 2 , ..... n
i j
A matrix is called triangular if A M m xn is tr ia n g u la r if a ij 0
i j
1 0 0 03 1 1
Examples
1 2 0 0 0 0 2
0 3 3 0 0 0 1
7 0 0
Example:
0 1 0
0 0 2
L et A, B M m xn , A ( a ij ), B ( b ij ), th e n :
a 1 1 b1 1 a 1 2 b1 2 ... a 1 n b1 n
A B ( a ij b ij ) ... ... ... ... M ( )
m xn
a b a m 2 bm 2 ... a m n b m n
m1 m1
0 0 ... 0
The opposite matrix is
A ( a ij ) M m xn
( ) if A M m xn
Then A B A ( B ) ( a ij b ij ) M m xn
( ) if A , B M m xn
Properties:
2
(iv) Additive inverse: A M m xn
( ) A M m xn
( ) / A ( A ) ( A ) A 0 m xn
2. SCALAR MULTIPLICATION
ka
Properties: If A , B M m x n ( ) , k , l m1
kam 2 ... kamn
(1) k ( A B ) k A k B
( 2 ) ( k l ) A k A lA
( 3 ) ( k ·l ) A k ( lA )
( 4 ) 1· A A 0· A 0 m x n
Examples: 3 1 4 3
L et A 2 1 B 2 2 , th e n
0 2 1 1
7 2 6 2 6 11
A B 4 1 2A 4 2 2 A 3B 2 8
1 3 0 4 3 1
3. MATRIX MULTIPLICATION
b1
b2
A ·B a1 a2 ... a n · a ·b a ·b ... a ·b
1 1 2 2 n n
bn
Example:
4
3 1 2 · 0 3·4 1·0 ( 2 )·1 1 0
1
c1 1 c1 2 ... c1 n
C A · B ... ... ... ... w h e re c ij R i ·C a i 1 ·b1 j ..... a ip b p j
j
c cm 2 ... c m n
m1 3
Example:
1 0 1
1 0 3 8 12 1
· 2 1 1
0 3 1 2x3 9 1 3 2x3
3 4 0
3x3
1 0 1
c1 1 1 0 3 · 2 8 ; c 1 2 1 0 3 · 1 1 2 ; c 1 3 1 0 3 · 1 1
3 4 0
1 0 1
c 21 0 3 1 · 2 9 ; c 2 2 0 3 1 · 1 1; c 2 3 0 3 1 · 1 3
3 4 0
Properties:
I ) A s s o c ia tiv e p r o p e r ty : A · ( B ·C ) ( A · B ) ·C A, B , C
A · ( B C ) A · B A ·C
I I ) D is tr ib u tiv e p r o p e r tie s : A, B , C
( B C )·A B ·A C ·A
I I I ) k · ( A ·B ) ( k · A ) ·B A · ( k ·B ) A, B k
NOTES:
1) A · B B · A n o c o m m u ta tiv e
A 0
2 ) A ·B 0 o r
B 0
Example:
1 00 0 0 0
·
0 03 1 0 0
Then: C A C B A B
AC BC A B
4. TRANSPOSE OF A MATRIX
L e t A ( a ij ) M . W e d e fin e th e tra n s p o s e o f A : A a ji M
t
m xn nxm
Example:
2 0
4
2 3 1
A A 3
t
1
0 1 2 1
2
Properties:
(i ) ( A ) A
t t
( ii ) ( A B ) A B
t t t
( iii ) ( k · A ) k · A k
t t
( iv ) ( A · B ) B · A
t t t
1 1 0 0 1 1
Exercise: let
A 5 2 1 ; B 2 1 0
7 0 4 1 0 2
Square matrices A M n
The (main) diagonal of a square matrix is formed by the elements a11, a22, …,ann. The trace is
the addition of these elements: tr ( A ) a 1 1 a 2 2 ... a n n
Example:
1 0 ... 0
0 1 ... 0
The identity or unit matrix is: In M ( )
n
0 0 ... 1
Examples: 1 2 3 0 7 8
A 2 7 0 is s y m m e tr ic B 7 0 1 is a n tis y m m e tr ic
3 0 1 8 1 0
Exercise: let 2 1 3 0 a 1
A x y z ;B 3 0 7
a) Calculate their traces 3
0 1 4 b
7 c
Invertible matrix
A matrix A M n is
invertible if B M n so that A·B = B·A = In . Otherwise it is called
singular matrix. B=A-1 is called the inverse of A
NOTE:
1
1) If A , it is u n iq u e
2 ) If B M n ( ) / A ·B I n B · A I n
Properties:
To calculate the inverse of an invertible matrix A, we have to transform the matrix (A|I) into
the matrix (I|A-1) by using these elementary operations:
1 1 7
6 12 12
2 1 7
1 1 1 1 1
A 4 2 2 6
3 6 6 12
2 5 1
1 5 1
6 12 12
NOTE: if we obtain a row of zeros in the matrix on the left, A is a singular matrix
2 1 3 3 1 6
2 1
A 1 0 1 ;B 1 0 2 ;C
3 1 1
0 1 2
7 4
Solutions: 0 1 1
1 1 1 1 1
A 4 7 5 ; B is s in g u la r ; C
4
1 2
0 3 1
Matrix applications
The following matrix consists of a shoe store’s inventory of flip flops, clogs, and Mary Janes in
sizes small, medium, and large:
The store wants to know how much their inventory is worth for all the shoes. How should we
set up the matrix multiplication to determine this the best way?
The trick for these types of problems is to line up what matches (flip flops, clogs, and Mary
Janes), and that will be “in the middle” when we multiply. This way our dimension will line up.
Another way to look at it is we need to line up what goes across the first matrix with what goes
down the second matrix. So our matrix multiplication will look like this:
So we’ll have $1050 worth of small shoes, $2315 worth of medium shoes, and $1255 worth of
large shoes for a total of $4620
Exercise. A factory makes two types of washing machine, A and B, in three different finishes,
N, L and S. It produces the A model: 400 units of N finish, 200 units of L finish and 50 of S finish.
It produces the B model: 300 units of N finish, 100 units of L finish and 30 of S finish. It takes 25
hours of work and 1 hour of administration to make the N finish. It takes 30 hours of work and
1.2 hour of administration to make the L finish. It takes 33 hours of work and 1.3 hour of
administration to make S finish.
b) Find a matrix that expresses the hours of work and administration for each model.
N L S
N 25 1
L 30 1 .2
S 3 3 1 .3
W A
25 1
400 200 50 17650 705 A
· 3 0 1 .2
300 100 3 0
11490 459 B
33 1 .3
W A
Exam
1 0 0 1 0 2
1. Let
A 1 1 0 ;B 3 2 6
1 0 1 0 1 0
calculate 3A - 5B
2 0 10 2 0 10 1 0 10
2 0 10
a) b) c) d)
12 7 30 12 7 30 12 7 30 2 3 30
3 3 3 3 3 5 3
5 3 5 5 7
2. Calculate A·B
3 0 2 1 0 2 1 0 2
3 0 2
a) b) 11 2 6 c) 4 2 8 d) 4 2 8
11 2 6
1
1 1 0 1 1 2 1 1 2
1 0
3. Calculate At + Bt
2 0 3 2 4 1
2 4 1
2 0 2
a) b) c) 0 7 1 d) 0 3 1
0 3 1
2 1 2 1
4 3 6
2 6
1 6
1 6
1 8
1
4. Find A-1
1 0 0 1 0 0 1 0 1
a) b) c) d) A is a singular matrix
1 1 1 0 1 1 0
1 0
1 1 1 1 1
0 1 0 0
5. Find B-1
1 2 1 1 4 1
3 2 1
a) b) 2 1 0 c) 0 1 0 d) B is a singular matrix
2 1 0
1
1 3 1 1 6
1 0
0
6. Calculate 5BA
10 20 10 5 0 10 5
15 0
15 0 10
a) b) c) 5 15 30 d) 5 5 20
55 0 30
55 10 30 5
5 0 5 0 5
5 0
5 5 0 5
7. Calculate B·A-1
1 0 2 11 3 2 1 0 2
a) b) c) 5 d) B is a singular matrix
2 3 2 0 2 6
5 6
1 1 0 1 0
1 0 1 1
8. Calculate B2
0 12 2 1 2 2 1 2 3 1 21 3
a) b) c) d)
2 3 8 9 10 18 2 3 5 0 13 5
3 2 6 3 2 6 0 12 0 10 12 0
0 0
9. Find a, b and c to make that: 1 3 2 a b 3b
· 1 4
1 4 0
a b c 4b
a) a = -5, b = 4, c = 5 3 0
b) a = 5, b = 4, c = -2
c) a = 3, b = 4, c = -2
d) a = 5, b = 4, c = -5
1 0
10. Let the matrix:
, which of the following sentences is false?
0 1
a) It is a symmetric matrix
b) It is a triangular matrix
Vocabulary
- Matrix/matrices: matriz/matrices
- Row vector or row matrix: matriz fila - Distributive properties: propiedades distributivas
10
The end