Matrices and Matrix Operations
Matrices and Matrix Operations
Matrices
1 3 25 1
2 5 6
Example 1. B = 5 7 10 , C = , D = 2 , E = 1 212
8 10 15 23
1 2 −10 33 3 31
Scalars themselves will be identified with the corresponding 11 − matrices, e.g. a a ;
unit.
a1 j
a
the k − th row of A ; and for each j 1, 2,..., n , the m1 − matrix is called the j-th
2j
amj
column of A .
1 2 4 5
7 8 9 10
Example 2. A =
5 −3 7 9
2 5 8 3
4
9
Also the third column as
7
8
Definition 3. An element akj of a matrix A is called the kj − th entry of A and is
denoted by A kj := akj . Two matrices A and B are equal if they are of the same size, say
both are of m n size, and A kj = B kj for all k 1, 2,..., m ; j 1, 2,..., n .
Example 3. The matrices below are not equal, since their size are not same.
1 2 0 1 2
4 6 0 4 6
23 22
and
0 0
0 0
22 = 0 0 011 = 0 .
0 0 22 0 0
32
1 0 0 0 0
0 1 0 0 0
I nn = 0 0 1 0 0
0 0 0 0 1 nn
1 0 0 0
1 0 0 0
1 0 0
= 0 1 0 , I 22 = 1 0
=
0 1
Example. I 33 , I 44
0 0 1 0
0 0 1
0 0 0 1
Example 4. Every identity matrix is a square matrix. But a zero matrix doesn’t need to
be a square matrix, for example
0 0 0
23 =
0 0 0
1 0
Example 5. Let A be 2 2 − matrix such as A = and = 2 . Then
3 5
1 0 2.1 2.0 2 0
2. A = 2. = =
3 5 2.3 2.5 6 10
Definition 7. The transpose operation is the interchanging of rows of a matrix with its
columns: A → AT , where
AT = A jk .
kj
T 2 4
1 2 3
T
2 4 6
Example 6. 2 = 4 0 8 = 4 0
2 0 4 6 8
The following several operations are depending on the size of involved matrices.
A + B kj = Akj + B kj for all k 1, 2,..., m and j 1, 2,..., n.
The introduced above matrix operations possess the following natural properties:
a) A + B = B + A (commutativity of addition);
b) ( A + B ) + C = A + ( B + C ) (associativity of addition);
c) . ( A + B ) = A + B ;
d) ( A ) = AT ;
T
e) ( A + B ) = AT + BT ;
T
g) A + O = O + A = A
0 1 1 2 1 0
Example 7. A = , B= , C= and = 2 .
1 2 3 4 0 1
0 1 1 2 0 + 1 1 + 2 1 3
A + B = + = =
1 2 3 4 1 + 3 2 + 4 4 6
a) A+ B = B + A
B + A = 1 2 0 1 1 + 0 2 + 1 1 3
3 + = =
4 1 2 3 + 1 4 + 2 4 6
0 1 1 2 1 0 1 3 1 0 1 + 1 3 + 0 2 3
b) ( A + B) + C = + + = + = =
1 2 3 4 0 1 4 6 0 1 4 + 0 6 + 1 4 7
0 1 1 2 1 0 0 1 2 2 2 3
A+ (B + C) = + + = + =
1 2 3 4 0 1 1 2 3 5 4 7
( A + B) + C = A + ( B + C )
1 3 2 6
. ( A + B ) = 2. =
4 6 8 12
c) .( A + B ) = A + B
0 1 1 2 0 2 2 4 2 6
A + B = 2. + 2. 3 4 = 2 4 + 6 8 = 8 12
1 2
T
0 1 0 2
T
0 2 0 1
( 2 A) = 2. = = = 2 = 2. AT
T
d)
1 2 2 4 2 4 1 2
1 4
T
0 1 1 2 1 3
T
( A + B) = + = = 3 6
T
3 4 4 6
1 2 A + B T = AT + BT
e) ( )
0 1 1 3 1 4
AT + BT = + =
1 2 2 4 3 6
0 1 0 0 0 1 0 0 0 1
f) A+O = + = = + =O+ A= A
1 2 0 0 1 2 0 0 1 2
Our next operation of the matrix multiplication is applicable if the number of columns
of the first factor is equal to the number of rows of the second factor.
n
AB ij = Aik B kj .
k =1
d) . ( A.B ) = ( . A ) .B = A. ( .B ) .
0 1 1 0
A= and B =
0 0 0 0
Then
Am n B n p = Cm p
0 1 1 0
A= ,B =
0 0 0 0
0 1 1 0 0.1 + 1.0 0.0 + 1.0 0 0
AB = = =
0 0 0 0 0.1 + 0.0 0.0 + 0.0 0 0
AB BA
1 0 0 1 1.0 + 0.0 1.1 + 0.0 0 1
BA = = =
0 0 0 0 0.0 + 0.0 0.1 + 0.0 0 0
1 2 5 6
Example 8. For the matrices A = and B = , find AB and BA .
3 4 7 8
2 4 1 0
1 0 2 0 −1 2
Example 9. A = , B = 1 3 , C = and D = 0 2
2 1 3 23 4 2 1 23
0 5 32 3 1 32
a) Find AB.
A23 .B32 = E22
2 4
1 0 2
AB = 1 3 = 1.2 + 0.1 + 0.2 1.4 + 0.3 + 2.5 = 2 14
2.2 + 1.1 + 3.0 2.4 + 1.3 + 3.5 5 26
2 1 3 23 0 5
32
c11 c12
(If we multiply A and B , we get 2 2 matrix. Let AB be AB = C = .Then
c21 c22
to get c11 we will multiply the first row of A with the first column of B , to get c12 we
will multiply the first row of A with the second column of B , to get c21 we wil
multiply the second row of A with the first column of B and to get c22 we will
c) Find AC.
A23C23 is not defined, since 3 2.
2 4
1 0 2 0 −1 2 2 14 0 −1 2
( A.B ) .C = . 1 3 . =
2 1 5 26 22 4 2 1 23
.
2 1 3 0 5 4
2.0 + 14.4 2 ( −1) + 14.2 2.2 + 14.1 56 26 18
= =
5.0 + 26.4 5. ( −1) + 26.2 5.2 + 26.1 104 47 36
2 4
1 0 2 0 −1 2 56 26 18
A. ( B.C ) = . 1 3 . =
2 1 3 0 5 4 2 1 104 47 36
e) Show that A. ( B + C ) = A.B + A.C .
2 4 1 0 3 4
1 0 2 1 0 2
A. ( B + D ) = 1 3 + 0 2 = . 1 5
2 1 3 0 5 3 1 2 1 3 3 6
3 + 0 + 6 4 + 0 + 12 9 16
= =
6 + 1 + 9 8 + 5 + 18 16 31
9 16
A.B + A.D =
16 31
2 4
1 0 2
Example 10. A = and B = 1 3
2 1 3 23
0 5 32
Then
2 4
T
T
=
( A.B ) =
1 0 2 2 14 2 5
=
T
1 3 5 26 14 26
2 1 3 0 5
( A.B ) = B . A
T T T
1 2
2 1 0 2.1 + 1.0 + 0.2 4 + 1 + 0 2 5
B .A =
T T
. 0 1 = =
4 3 5 2 3 4 + 0 + 10 8 + 3 + 15 14 26
x −1 2 y 2 0
Example 11 (Midterm). Find x , y , z and t if −2 + 3 = .
3 1 z 4 z t
x −1 2 y 2 0 −2 x 2 6 3 y 2 0
Solution. −2 + 3 = + =
3 1 z 4 z t −6 −2 3z 12 z t
−2 x + 6 2 + 3 y 2 0
=
−6 + 3z −2 + 12 z t
−2 x = −4 x = 2
−2 x + 6 = 2
2 + 3 y = 0 2
3 y = −2 y = − 2
3 x = 2, y = − , z = 3, t = 10
−6 + 3z = z −6 = −2 z z = 3 3
10 = t
t = 10
1 2 2 −1
Example 12 (Midterm). Let A = and B = .
3 2 −3 4
a) Find the solution of 2 A + 3B − 4I ,
Solution. a)
1 2 2 −1 1 0 2 4 6 −3 4 0
2 A + 3B − 4 I = 2 + 3 −4 = + −
3 2 −3 4 0 1 6 4 −9 12 0 4
2 + 6 − 4 4 − 3 + 0 4 1
= =
6 − 9 + 0 4 + 12 − 4 −3 12
1 2 2 −1 2 − 6 −1 + 8 −4 7 −4 0
b) AB = = = ( AB ) =
T
3 2 −3 4 6 − 6 −3 + 8 0 5 7 5
1 3 2 −3
AT = and BT =
2 2 −1 4
2 −3 1 3 2 − 6 6 − 6 −4 0
BT AT = = =
−1 4 2 2 −1 + 8 −3 + 8 7 5
( AB ) = BT AT .
T