Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

MATRICES

INTRODUCTION

For clarity and simplicity of notation, we use matrices and vectors in our

discussion of linear systems of ODEs. Matrix is a rectangular array of real

numbers arranged in “m” rows and “n” columns. The term “matrix” was

introduced by the English mathematician James Joseph Sylvester (1814- 1897)

in 1850. The size of a matrix is determined by the number of rows and columns.

The expression "m x n" is the dimension or order of the matrix. If the matrix has

only one column, it is called a column matrix and if it has only one row, it is

called a row matrix. The following is a 3 x 3 matrix or square matrix (i.e. 3 rows

and 3 columns).

4 −7 1
𝐴=[ 6 2 9]
−3 −8 3

The first non-zero entry in a row of a matrix is known as the leading entry

or the leading element. In the matrix above, 4 is the leading entry. The diagonal

from the upper left to the lower right is called the principal diagonal or main

diagonal and all entries in the said diagonal are called as diagonal entries. If all

entries in a matrix above the main diagonal are zero, then it is said to be a lower

triangular matrix, and if all the entries below the main diagonal are zero, the

matrix is referred to as the upper diagonal matrix.


4 0 0 4 −7 1 4 0 0
𝐴=[ 6 2 0] 𝐵 = [0 2 9] 𝐶 = [0 2 0]
−3 −8 3 0 0 3 0 0 3

Lower Triangular Matrix Upper Triangular Matrix Diagonal Matrix

Operations

1. Sum of matrices

If A and B are two matrices of the same order, the sum of A and B,

denoted by A + B, is the matrix for which each of its elements is the sum of

the corresponding elements of A and B.

Example: Find A + B.

−1 2 7 8 3 1
𝐴=[ ] 𝐵=[ ]
1 4 −6 −8 2 −3

Solution:

−1 + 8 2 + 3 7 + 1
𝐴+𝐵 =[ ]
1 − 8 4 + 2 −6 − 3

7 5 8
𝐵=[ ]
−7 6 −9

2. Difference of matrices

If A and B are matrices having the same order, then the difference of A

and B, denoted by A – B, is defined as A – B = A + (-B).

Example: Find A – B.

−1 1 8 −8
𝐴=[ 2 4] 𝐵 = [3 2]
7 −6 1 −3
Solution:

−1 1 −8 8
𝐴−𝐵 =[ 2 4 ] + [−3 −2]
7 −6 −1 3

−9 9
𝐴 − 𝐵 = [−1 2 ]
6 −3

3. Product of matrices

Supposed that A is a matrix of order m x p and B is a matrix of order p

x n, then the product of A and B, denoted by AB, is the n x n matrix for which

the element in the ith row and the jth column is the sum of the products

formed by multiplying each element in the ith row of A by the corresponding

element in the jth column of B.

Example: Find DC.

−1 1
8 3 1
𝐷=[ 2 4] 𝐶=[ ]
−8 2 −3
7 −6

D is a 3 x 2 matrix and C is a 2 x 3 matrix. The product DC can be

obtained because the number of columns of D (2 columns) is equal to the

number of rows of C (2 rows). The product DC will be a 3 x 3 matrix.

−1(8) + 1(−8) −1(3) + 1(2) −1(1) + 1(−3)


𝐷𝐶 = [ 2(8) + 4(−8) 2(3) + 4(2) 2(1) + 4(−3) ]
7(8) + (−6)(−8) 7(3) + (−6)(2) 7(1) + (−6)(−3)

−16 −1 −4
𝐷𝐶 = [−16 14 −10]
104 9 25
4. Transpose matrix

If matrix A is reflected in its main diagonal, so that all rows become

columns and all columns become rows without changing their relative order

of entries in the rows and columns, the result is a transpose matrix, AT.

Example

−1 1
−1 2 7 𝑇
𝐴=[ ] 𝐴 =[ 2 4]
1 4 −6
7 −6

5. Determinant

Determinant is a square matrix (i.e. the number of rows = the number

of column). Every determinant can be associated with a real number. The

following are the properties of determinants.

a. If the rows of one determinant are the same as the columns of another,

and in the same order, the two determinants are equal.

b. If two columns (or rows) of a determinant are interchanged, the value

of the resulting determinant is equal to the negative of the value of the

given determinant.

c. If two columns (or rows) of a determinant are identical, the value of the

determinant is zero.

d. If the elements of a column (or row) of a determinant are multiplied by

k, the value of the determinant is multiplied by k.


e. If the elements of the jth column of a determinant D are the sum aij +

bij, then 0 is the sum of the determinants D' and D" in which all the

columns of D, D' and D: are the same except the jth; furthermore, the

jth column of D' is aij, i = 1, 2, 3,..., n, and the jth column of D" is bij. I

= 1, 2, 3,… n. Similarly for rows.

f. The value of the determinant is not changed if a column is replaced by

the column plus a multiple of another column. Similarly for rows.

6. Cofactor of an Entry of a matrix

A cofactor of an entry of a matrix is the same as the cofactor of the entry

in the determinant of the matrix and thus, is defined only for square matrices.

Sign conventions:

+ − +
+ −
[ ] [− + −]
− +
+ − +

Example: Find the co-factor of 7 in the following matrix.

8 2 9
𝐴 = [3 1 8]
5 2 7

The equivalent matrix is:

8 2
𝐴 = +[ ]
3 1

The determinant of A is:

8 2
det 𝐴 = [ ] = (8)(1) − (2)(3) = 2
3 1
Thus, the cofactor of 7 is 2.

7. Cofactor matrix

A cofactor matrix is formed by replacing each element in' the given

matrix by its cofactor.

Example: Find cofactor matrix of A

8 2
𝐴=[ ]
3 1

1 3
Cofactor matrix of 𝐴 = [ ]
2 8

8. Inverse Matrix

Steps required to find for the Inverse Matrix (say. A):

a. Form the cofactor matrix of matrix A

b. Form the transpose matrix of the cofactor matrix A

c. Evaluate the determinant of matrix A

d. Divide each element in the (matrix cofactor)T

Example: Find the inverse matrix of A.

8 2 9
𝐴 = [3 1 8]
5 2 7

−9 19 1
Cofactor Matrix 𝐴 = [ 4 11 −6]
7 −37 2

−9 4 7
(Cofactor Matrix 𝐴)𝑇 = [ 19 11 −37]
1 −6 2
8 2 9
det 𝐴 = [3 1 8] = −25
5 2 7

Thus,

1 −9 4 7
𝐴−1 = − ⌈ 19 11 −37⌉
25
1 −6 2
VECTORS

INTRODUCTION

If a matrix has only one row or only one column it is called a vector. A

matrix having only one row is called a row vector.

Example:

𝐴 = [1 0 2]

Matrix having only one column is called a column vector.

Example:

1
𝐴 = [0]
2

Operations of Vectors

1. Sum of vectors

The sum of two vectors (say, a and b) is the vector of sums of corresponding

elements.

𝑎1 𝑏1
𝑎 = [ 𝑎2 ] and 𝑏 = [ 𝑏2 ]
𝑎𝑛 𝑏𝑛

𝑎1 + 𝑏1
𝑎 + 𝑏 = [ 𝑎2 + 𝑏2 ]
𝑎𝑛 + 𝑏𝑛

The difference of two vectors is the vector of differences of

corresponding elements.
2. Multiplication of vector

The multiplication of a vector by a vector produces some interesting

results, known as the vector inner product and as the vector outer product.

a. Vector Inner Product (Dot Product)

Assume that a and b are vectors, each with the same number

of elements. Then, the inner product of a and b is s.

𝑎′ 𝑏 = 𝑏 ′ 𝑎 = 𝑠

where

a and b are column vectors, each having n elements,

a’ is the transpose of a, which makes a' a row vector,

b' is the transpose of b, which makes b' a row vector,

and

s is a scalar; that is, s is a real number - not a matrix.

Note this interesting result. The product of two matrices is

usually another matrix. However, the inner product of two vectors

is different. It results in a real number - not a matrix. This is

illustrated below.

1 4
𝑎 = [2] and 𝑏 = [5]
3 6

Then,

𝑎′ 𝑏 = 1 × 4 + 2 × 5 + 3 × 6 = 4 + 10 + 18 = 32

Thus, the inner product of a’b is equal to 32

b. Vector Outer Product


Assume that a and b are vectors. Then, the outer product of a

and b is C.

𝑎𝑏′ = 𝐶

Where

a is a column vector, having m elements,

b is a column vector, having n elements,

b' is the transpose of b, which makes b' a row vector, and

C is a rectangular m x n matrix

Unlike the inner product, the outer product of two vectors

produces a rectangular matrix, not a scalar. This is illustrated below.

𝑥
𝑣
𝑎 = [ ] 𝑏 = [𝑦]
𝑤
𝑧

Then,

𝑣×𝑥 𝑣×𝑦 𝑣×𝑧


𝐶 = 𝑎𝑏 ′ = [𝑤 × 𝑥 𝑤×𝑦 𝑤 × 𝑧]

Notice that the elements of Matrix C consist of the product of

elements from Vector A crossed with elements from Vector B. Thus,

Matrix C winds up being a matrix of cross products from the two

vectors.
Rank

The maximum number of linearly independent rows in a matrix A is called

the row rank of A, and the maximum number of linearly independent columns

in A is called the column rank of A. If A is an m by n matrix, that is, if A has m

rows and n columns, then it is obvious that

𝑟𝑜𝑤 𝑟𝑎𝑛𝑘 𝑜𝑓 𝐴 ≤ 𝑚

𝑐𝑜𝑙𝑢𝑚𝑛 𝑟𝑎𝑛𝑘 𝑜𝑓 𝐴 ≤ 𝑛

What is not obvious, however, is that for any matrix A, the row rank of A

= the column rank of A. Because of this fact, there is no reason to distinguish

between row rank and column rank; the common value is simply called the rank

of the matrix. Therefore, if A is m x n, it follows that

𝑟𝑎𝑛𝑘(𝐴𝑚𝑥𝑛 ) ≤ min(𝑚, 𝑛)

where min(𝑚, 𝑛) denotes the smaller of the two numbers m and n (or their

common value if m = n). For example, the rank of a 3 x 5 matrix can no more

than 3, the rank of a 4 x 2 matrix can be no more than 2.

The process by which the rank of a matrix is determined can be illustrated

by the following example. Suppose A is the 4 x 4 matrix

1 −2 0 4
3 1 1 0
𝐴=[ ]
−1 −5 −1 8
3 8 2 −12

The four row vectors,


𝑟1 = (1, −2,0,4)

𝑟2 = (3,1,1,0)

𝑟3 = (−1, −5, −1,8)

𝑟4 = (3,8,2, −12)

are not independent, since, for example

𝑟3 = 2𝑟1 − 𝑟2 and 𝑟4 = −3𝑟1 + 2𝑟2

The fact that the vectors r 3 and r 4 can be written as linear combinations

of the other two (r1 and r2, which are independent) means that the maximum

number of independent rows is 2. Thus, the row rank – and therefore the rank –

of this matrix is 2.

𝑟3 = 2𝑟1 − 𝑟2 and 𝑟4 = −3𝑟1 + 2𝑟2 can be rewritten as follows:

−2𝑟1 + 𝑟2 + 𝑟3 = 0 and 3𝑟1 − 2𝑟2 + 𝑟4 = 0

The first equation here implies that if −2 times that first row is added to

the third and then the second row is added to the (new) third row, the third row

will be become 0, a row of zeros. The second equation above says that similar

operations performed on the fourth row can produce a row of zeros there also. If

after these operations are completed, −3 times the first row is then added to the

second row (to clear out all entries below the entry a1 = 1 in the first column),

these elementary row operations reduce the original matrix A to the echelon form
1 −2 0 4
0 7 1 −12
𝐴𝑟𝑟𝑒𝑓 =[ ]
0 0 0 0
0 0 0 0

The fact that there are exactly 2 nonzero rows in the reduced form of the

matrix indicates that the maximum number of linearly independent rows is 2;

hence, rank A = 2, in agreement with the conclusion above. In general, then, to

compute the rank of a matrix, perform elementary row operations until the matrix

is left in echelon form; the number of nonzero rows remaining in the reduced matrix

is the rank.

You might also like