Note16 Matrix Algebra1 Basic Operations PDF
Note16 Matrix Algebra1 Basic Operations PDF
Tony U
University of Macau
Outline
1 Introduction to Matrices
2 Special Types of Matrices
3 Matrix Operations
4 Properties of Matrix Operations
5 Applications
6 Power of Matrix
Introduction to Matrices
Introduction to Matrices
A = ..
..
..
..
.
.
.
.
am1 am2
amn
is usually
where A is the matrix name and amn are the matrix elements.
-1-
Introduction to Matrices
-3-
-4-
Example 1.
1 4
Given A = [aij ] = 2 0 .
3 6
a. Find a12 , a22 and a31 .
b. Find the transpose of A, AT . [Note that dim(A) = 3 2 while
dim(AT ) = 2 3.]
-5-
-6-
-6-
1 2 3
4 0 6
-6-
Matrix Operations
Matrix Operations
Addition and Subtraction
Two matrices A and B can be added or subtracted if they have
exactly the same dimensions.
A + B is calculated by adding corresponding elements.
A B is calculated by subtracting corresponding elements.
Scalar multiplication
If A = [aij ] is an m n matrix and k is a real number (also called a
scalar), then kA denotes the matrix [kaij ] .
-7-
Matrix Operations
Inner Product
The inner product of a 1 n row matrix A = [a1 a2 an ] and an
n 1 column matrix B = [b1 b2 bn ]T is
b1
b2
A B = [a1 a2 an ] .. = a1 b1 + a2 b2 + + an bn .
.
bn
Note: the row and column matrix should contain same number of
elements. The inner product is a real number.
-8-
Matrix Operations
Matrix multiplication
The matrix product of A and B, is a matrix whose element in the
i th row and jth column is the inner product of the i th row of
matrix A and the jth column of matrix B.
b1j
ai 1 ai 2 ain
cij
b2j
bnj
In the matrix product AB: then number of columns of A
should be equal to the number of rows of B.
If the dim(A) = a b and dim(B) = c d, the matrix product
AB is well defined if and only if b = c, the dim(AB) = a d.
-9-
Matrix Operations
Let
A=
1 2
3 4
1 0
B = 2 3 ,
1 2
and
D=
1 2
1 2
C=
1 0 1
2 3 1
-10-
Matrix Operations
3 6
9 12
-11-
Matrix Operations
3 6
9 12
-11-
Matrix Operations
3 6
9 12
1+1 2+2
3+1 4+2
-11-
2 4
4 6
Matrix Operations
3 6
9 12
1+1 2+2
3+1 4+2
2 4
4 6
-11-
Matrix Operations
3 6
9 12
1+1 2+2
3+1 4+2
2 4
4 6
-11-
Matrix Operations
(v)
AC =
1 2
3 4
1 0 1
2 3 1
1 1 + 2 2 1 0 + 2 3 1 1 + 2 1
=
3 1 + 4 2 3 0 + 4 3 3 1 + 4 1
5 6 1
=
11 12 1
-12-
Example 3.
Compute BC and CB if
2 1
B=
1 1
and
-14-
C=
3 1
2 2
Sol.:
3 1
2 2
BC =
2 1
1 1
23+12
2 1 + 1 2
1 3 + 1 2 1 1 + 1 2
CB =
3 1
2 2
8 0
1 3
2 1
1 1
Note: BC 6= CB.
-15-
7 2
2 4
Applications
ApplicationsExample 4.
A grocery store carries three brands of detergent: Brand x, Brand
y and Brand z. The row matrix below represents the number of
units of each of these brands sold during the month of June.
Brand
Number of units
x
[100
y
500
z
300]
The column matrix below represents the unit selling price of each
brand:
$2
Brand x
P = $1 Brand y
$1.5
Brand z
Find the total sales revenue for all these products during the
month of June.
-16-
Applications
Sol.: The total sales revenue is the inner product of the row matrix
and column matrix:
2
[100 500 300] 1 = 100(2) + 500(1) + 300(1.5) = $1, 150
1.5
-17-
Applications
Example 5.
A company manufactures two models of a product: Model A and
Model B. Each model must pass through department I (Assembly)
and department II (Polishing). The unit time requirements (in
hours) for each model in each department are given by matrix T :
T =
Model
A
3
2
Model
B
5
1
Department I
Department II
Applications
2 1
700
3(500) + 5(700)
=
2(500) + 1(700)
5, 000 (hrs)
Department I
=
1, 700 (hrs)
Department II
-19-
Power of Matrix
Power of Matrix
-20-