You are on page 1of 47

Matrix Algebra

Matrix
A rectangular arrangement of mn (ij) numbers into m
horizontal rows and n vertical columns enclosed by a pair
of brackets [ ], such as




Is called an mxn (or ixj) matrix or a matrix of order mxn.

A =
a11 ,., a1n
a21 ,., a2n
. . . .
am1 ,., amn





(

(
(
(
= Aij { }
Dimensions of a Matrix
Number of Rows: 2
Number of Columns:3
A (2 x 3) Matrix
(
(
(

=
3 1 2
1 6 3
7 4 5
B
Number of Rows: 3
Number of Columns:3
A (3 x 3) Matrix
Row Vector
[1 x n] matrix
| | { } m n a a a a A , , 2 1 = . =
{ } n
m
a
a
a
a
A
2
1
=
(
(
(
(

.
=
Column Vector
[m x 1] matrix
Types of Matrix
Square Matrix

Same number of rows and columns
B =
5 4 7
3 6 1
2 1 3




(

(
(
The null matrix, written 0, is the matrix all of whose
components are zero.
The null matrix of order 2 3 is


The identity matrix, written I, is a square matrix all of
which entries are zero except those on the main diagonal,
which are ones.
The identity matrix of order 4 is


A diagonal matrix is a square matrix all of which entries
are zero except for those on the main diagonal, which
may be arbitrary.





An upper triangular matrix is a square matrix in which
all elements underneath the main diagonal vanish. A
lower triangular matrix is a square matrix in which all
entries above the main diagonal vanish.



Algebra of Matrices
Matrix Addition and Subtraction
A new matrix C may be defined as the additive
combination of matrices A and B where:
C = A + B
is defined by:





Note: all three matrices are of the same dimension


{ } { } { } ij ij ij B A C + =
Addition
A =
a11 a12
a21 a22



(

(
B =
b11 b12
b21 b22



(

(
C =
a11 +b11 a12 + b12
a21 +b21 a22 + b22



(

(
If
and
then
Matrix Addition Example
A + B =
3 4
5 6



(

(
+
1 2
3 4



(

(
=
4 6
8 10



(

(
= C
Properties of Addition of Matrices
Matrix addition is commutative i.e. A+B = B+A

Matrix addition is associative i.e. (A+B)+C = A+(B+C)

Existence of additive identity i.e. A+O = A = A+O (where O
is a zero matrix)

Existence of additive inverse i.e. A+(-A) = O = (-A)+A


Matrix Subtraction
If A and B are two matrices then subtraction of the
matrices takes the following form:

C = A - B


{ } { } { } ij ij ij B A C =
Matrix Multiplication
Matrices A and B have these dimensions:
[r x c] and [s x d]
Matrix Multiplication
Matrices A and B can be multiplied if:
[r x c] and [s x d]
c = s
Matrix Multiplication
The resulting matrix will have the dimensions:
[r x c] and [s x d]
r x d
Computation
A x B = C
A =
a11 a12
a21 a22



(

(
B =
b11 b12 b13
b21 b22 b23



(

(
(

+ + +
+ + +
=
23 22 13 21 22 22 12 21 21 22 11 21
23 12 13 11 22 12 12 11 21 12 11 11



b a b a b a b a b a b a
b a b a b a b a b a b a
C
[2 x 2]
[2 x 3]
[2 x 3]
Computation
A x B = C

A =
2 3
1 1
1 0




(

(
(
and B =
1 1 1
1 0 2



(

(
[3 x 2] [2 x 3]
A and B can be multiplied
(
(
(

=
(
(
(

= + = + = +
= + = + = +
= + = + = +
=
1 1 1
3 1 2
8 2 5

1 2 * 0 1 * 1 1 0 * 0 1 * 1 1 1 * 0 1 * 1
3 2 * 1 1 * 1 1 0 * 1 1 * 1 2 1 * 1 1 * 1
8 2 * 3 1 * 2 2 0 * 3 1 * 2 5 1 * 3 1 * 2
C
[3 x 3]
Computation
A x B = C

(
(
(

=
(
(
(

= + = + = +
= + = + = +
= + = + = +
=
1 1 1
3 1 2
8 2 5

1 2 * 0 1 * 1 1 0 * 0 1 * 1 1 1 * 0 1 * 1
3 2 * 1 1 * 1 1 0 * 1 1 * 1 2 1 * 1 1 * 1
8 2 * 3 1 * 2 2 0 * 3 1 * 2 5 1 * 3 1 * 2
C
A =
2 3
1 1
1 0




(

(
(
and B =
1 1 1
1 0 2



(

(
[3 x 2] [2 x 3]
[3 x 3]
Result is 3 x 3
Properties of Matrix Products
Matrix multiplication is associative i.e. if A, B and C are
matrices of the order mxn, nxp and pxq respectively
then,
A(BC) = (AB)C
Matrix multiplication distributes over matrix addition i.e.
if A is a matrix of order mxn and if B and C are matrices
of order nxp, then
A(B + C) = AB + AC, and (B + C)A = BA + CA

Multiplicative Identity: If A is an mxn matrix and if In
denotes the identity matrix of order nxn and Im denotes
the identity matrix of order mxm then,
I
m
A = A = AI
n


Scalar Multiplication of Matrices
If A is an m n matrix and k is a scalar, then we let kA
denote the matrix obtained by multiplying every element
of A by k. This procedure is called scalar multiplication.


( ) ( )
( )
( )
k hA kh A
k h A kA hA
k A B kA kB
=
+ = +
+ = +
(

=
3 1 0
2 2 1
A
( ) ( ) ( )
( ) ( ) ( )
(

=
(

=
9 3 0
6 6 3
3 3 1 3 0 3
2 3 2 3 1 3
3A
PROPERTIES OF SCALAR MULTIPLICATION
Matrix Powers
The product AA is called the square of A and is denoted
by A
2
. Note that A must be a square matrix.
Similarly, A
3
= AAA = A
2
A = A A
2

This definition does not encompass negative powers.
A square matrix A that satisfies A = A
2
is called
idempotent.
A square matrix A whose pth power is the null matrix is
called p-nilpotent.


Transpose Matrix
Properties of the Transpose of a Matrix:
Let A and B be two matrices of order m x n. Then (A B)
= A B
Let A be a matrix of order m x n and k be a scalar. Then
(kA) = k A
Let A and B be matrices of order m x n and n x p
respectively. Then (AB) = BA
Let A be a matrix of order m x n. Then (A) = A

(
(
(
(

.
. . . . .
.
.
=
mn n n
m
m
a a a
a a a
a a a
A
, ,

, ,
, ,
'
2 1
2 22 12
1 21 11
Rows become columns and columns become rows
Symmetry and Anti-symmetry
Square matrices for which a
ij
=a
ji
are called symmetric about the main
diagonal or simply
symmetric.
The following is a symmetric matrix of order 3:



Square matrices for which a
ij
=-a
ji
are called anti-symmetric or skew-
symmetric. The diagonal entries of an anti-symmetric matrix must be
zero.
The following is an anti-symmetric matrix of order 4:


Properties of Symmetric and
Anti-Symmetric Matrices
If A is a square matrix then,
A + A is symmetric
A - A is anti-symmetric
If A and B are two symmetric (or anti-symmetric)
matrices of the same order, then so is A + B
If A is symmetric (or anti-symmetric) and if k is a scalar,
then KA is also symmetric (or anti-symmetric)
The product of a matrix by its transposed matrix is a
symmetrical matrix.


Determinant of a Matrix
Example: Determinant of a
Matrix of Order 3
(
(
(

=
33 32 31
23 22 21
13 12 11
a a a
a a a
a a a
A
33 33 23 23 13 13
32 32 22 22 12 12
31 31 21 21 11 11
33 33 32 32 31 31
23 23 22 22 21 21
13 13 12 12 11 11
) det(
C a C a C a
C a C a C a
C a C a C a
C a C a C a
C a C a C a
C a C a C a A
+ + =
+ + =
+ + =
+ + =
+ + =
+ + =
det( ) ? A =
(
(
(

=
1 4 4
2 1 3
1 2 0
A
1 1
11
1 2
( 1) 7
4 1
C
+

= =

Solution
1 2
12
3 2
( 1) (3 8) 5
4 1
C
+
= = =
1 3
13
3 1
( 1) 12 4 8
4 4
C
+

= = + =

11 11 12 12 13 13
det( )
(0)(7) (2)(5) (1)( 8) 2
A a C a C a C = + +
= + + =
Example: Determinant of a Matrix
of Order 3
Determinant of a Triangular Matrix
If A is an n x n triangular matrix (upper triangular, lower
triangular, or diagonal), then its determinant is the
product of the entries on the main diagonal. That is


A= a
11
a
22
a
33
.a
nn
Exercise
Find the determinants of the following triangular
matrices.
(a)
(
(
(
(


=
3 3 5 1
0 1 6 5
0 0 2 4
0 0 0 2
A
(b)
(
(
(
(
(
(

=
2 0 0 0 0
0 4 0 0 0
0 0 2 0 0
0 0 0 3 0
0 0 0 0 1
B
|A| = (2)(2)(1)(3) = 12
|B| = (1)(3)(2)(4)(2) = 48
(a)
(b)
Solution:
Conditions that yield a zero
determinant
If A is a square matrix and any of the following
conditions is true, then det (A) = 0.


(a) An entire row (or an entire column) consists of zeros.
(b) Two rows (or two columns) are equal.
(c) One row (or column) is a multiple of another row (or column).
Properties of Determinants
The value of a determinant remains unchanged if its rows
and columns are interchanged.





If two rows or columns of a determinant are interchanged,
then the sign of the determinant is changed.
3 3 3
2 2 2
1 1 1
3 2 1
3 2 1
3 2 1
c b a
c b a
c b a
c c c
b b b
a a a
=
A = A
= A = A
1
3 2 1
3 2 1
3 2 1
1
3 2 1
3 2 1
3 2 1
;
a a a
b b b
c c c
c c c
b b b
a a a
If each element of a row or a column of a determinant is
multiplied by a constant k, then its value gets multiplied by
k.




If some or all the elements of a row (or column) of a
determinant are expresses as sum of two (or more) terms,
then the determinant can be expressed as the sum of two
or more determinants.
Properties of Determinants
A = A
= A = A
k
c c kc
b b kb
a a ka
c c c
b b b
a a a
1
3 2 1
3 2 1
3 2 1
1
3 2 1
3 2 1
3 2 1
;
11 12 13
21 21 22 22 23 23
31 32 33
a a a
a b a b a b
a a a
+ + +
33 32 31
23 22 21
13 12 11
33 32 31
23 22 21
13 12 11
a a a
b b b
a a a
a a a
a a a
a a a
+ =
Minor of the entry a
ij
: The minor of an element a
ij
of
determinant of a matrix A is the determinant obtained by deleting the
i
th
row and j
th
column in which the element a
ij
lies.

Cofactor of a
ij


( 1)
i j
ij ij
C M
+
=
Example
(
(
(

=
33 32 31
23 22 21
13 12 11
a a a
a a a
a a a
A
33 32
13 12
21
a a
a a
M =
21 21
1 2
21
) 1 ( M M C = =
+
33 31
13 11
22
a a
a a
M =
22 22
2 2
22
) 1 ( M M C = =
+
(
(
(

=
33 32 31
23 22 21
13 12 11
a a a
a a a
a a a
A
Adjoint of a Matrix
Let A =(aij) be a square matrix of order n and let Cij be
the cofactor of aij in the determinant A . Then the
adjoint of A, denoted by adj A, is defined as the transpose
of the cofactor matrix Cij.


Let

(
(
(

=
33 32 31
23 22 21
13 12 11
a a a
a a a
a a a
A
Then
(
(
(

=
33 23 13
32 22 12
31 21 11
C C C
C C C
C C C
adjA
Properties of the Adjoint of a
Matrix
If A is a square matrix of order n, then
A (adj A) = (adj A) A

If A is a square matrix of order n, then
adj (A) = (adj A)

If A and B are two square matrices of the same order,
then
adj (AB) = adj (B) adj (A)


Inverse of a Square Matrix
Let A be a square matrix of order n. Then a square
matrix B of order n, if it exists, is called an inverse of A if
AB = BA = In
A matrix A having an inverse is called an invertible
matrix.

A matrix A is said to be singular if A = 0

Is said to be non-singular if A 0

If A is a square matrix s.t. A 0 , then A is invertible and
,
A
-1
= 1 / A ( adj A)


Properties of the Inverse of a Matrix
A square matrix is invertible if and only if it is non-
singular.

The inverse of the inverse is the original matrix itself, i.e.
(A
-1
)
-1
= A

The inverse of the transpose of a matrix is the transpose
of its inverse, i.e., (A)
-1
=(A
-1
)

Reversal Law: If A and B are two invertible matrices of
the same order, then AB is also invertible and moreover
(AB)
-1
= B
-1
A
-1



Determinant of an invertible matrix
A square matrix A is invertible (nonsingular) if and only if
det (A) = 0


Example: (Classifying square matrices as singular or nonsingular)
= 0 A
(
(
(


=
1 2 3
1 2 3
1 2 0
A
(
(
(


=
1 2 3
1 2 3
1 2 0
B
A has no inverse (it is singular).
= = 0 12 B
B has inverse (it is nonsingular).
Solution:
Example
1
A
(
(
(

=
2 0 1
1 2 0
2 3 1
A
(a) Find the adjoint of A.
(b) Use the adjoint of A to find
, 4
2 0
1 2
11
=

+ = C , 1
2 1
1 0
12
=

= C
2
0 1
2 0
13
=

+ = C
( 1)
i j
ij ij
C M
+
= Q
, 6
2 0
2 3
21
= = C , 0
2 1
2 1
22
=

+ = C 3
0 1
3 1
23
=

= C
, 7
1 2
2 3
31
=

+ = C , 1
1 0
2 1
32
=

= C 2
2 0
3 1
33
=

+ = C
Solution:
Cofactor matrix of A

4 1 2
6 0 3
7 1 2
ij
C
(
(
(
=

(
(

Adjoint matrix of A

(
(
(

=
2 3 2
1 0 1
7 6 4
3
1

Inverse matrix of A
( )
1
1
( )
det
A adj A
A

=
( )
det 3 A = Q
(
(
(

=
3
2
3
2
3
1
3
1
3
7
3
4
1
0
2
Check:
I AA =
1
Methods of solving a system of
linear equations

Matrix Inverse Method
Cramers Rule (or Determinant Method)


Matrix Inverse Method
The system of equations is written as
AX=B

We multiply by A-1 on both the sides-
A
-1
(AX) = A
-1
B

X = A
-1
B


Example
Solution
(

=
(

9
6
*
1 2
1 1

2
1
x
x
(

=
(

3
3

2
1
x
x
(

1 2
1 1

Note:
Invers
e of
i
s
(

1 2
1 1


9
6
*
1 2
1 1
*
1 2
1 1
*
1 2
1 1

2
1
(

=
(

x
x
Premultiply both sides
by inverse matrix

3
3
*
1 0
0 1

2
1
(

=
(

x
x
A square matrix multiplied
by its inverse results in the
identity matrix.
A 2x2 identity matrix
multiplied by the 2x1
matrix results in the
original 2x1 matrix.
Cramers Rule
Let D be the determinant of the coefficient matrix s.t.






Now, if D 0, then the system has a unique solution given by:

x
1
= D
1
/D, x
2
= D
2
/D,, x
n
= D
n
/D

Di is obtained from D by replacing the i
th
column of D by the elements of
matrix B.

Note: Cramers rule is applicable provided D 0.


nn n n
n
n
a a a
a a a
a a a
D
...
..
..
..
..
..
..
...
...
2 1
2 22 21
1 12 11
=
8
4 4 2
1 0 0
3 2 1
) det(
1
=

= A
2 4 4 3
0 2
1 3 2
= +
= +
= +
z y x
z x
z y x
Solution
10
4 4 3
1 0 2
3 2 1
) det( =


= A
, 15
4 2 3
1 0 2
3 1 1
) det(
2
=

= A 16
2 4 3
0 0 2
1 2 1
) det(
3
=

= A
1
det( ) 4
det( ) 5
A
x
A
= =
2
3
) det(
) det(
2

= =
A
A
y
5
8
) det(
) det(
3

= =
A
A
z
Cramers rule to solve the system of
linear equations

You might also like