Sei sulla pagina 1di 53

Topic 7

Matrices

Definition
A matrix is a rectangular array of numbers.
A matrix with m rows and n columns is called
an m x n matrix. The matrix is said to have
order m x n. The entries in a matrix are
called the elements of the matrix.

Definition
An

m n

A =

matrix A has the form


a11
a
21
a 31

.
.

.
.

a m1

a12
a 22
.a 32
.
.
.
.
am2

a13
a 23
.a 33
.
.
.
.
.a m 3

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

The elements are enclosed in large


square brackets.

a1n
a 2n
a 3n

.
.

.
.

a mn

Example
Identify orders of the following matrices:

0 3
2 1

1 4

3 2

[2, 3, 5, 1]
1 4

3 5 0 4
2 3 1 3

2 4

1 2
2 4

6 0

4 2

1 1
3 2
1 3

3 5

4 4

Example
Write down the 3 3 matrix with elements aij given by aij = i j.

a11 a12 a13

a
a
a
23
21 22
a31 a32 a33

Special Matrices --- Row


Matrix
A matrix with only one row is called a row
matrix.
[1

2 3 4]

Special Matrices --Column Matrix


A matrix with only one column is called a
column matrix.
1
2

3

4

Definition
zi := (ai1, ai 2 ,..., ain )

A =

a11
a
21
a 31

.
.

.
.

a m1

a12
a 22
.a 32
.
.
.
.
am2

a13
a 23
.a 33
.
.
.
.
.a m 3

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

a1n
a 2n
a 3n

.
.

.
.

a mn

z1
z2
z3

zm

z1

z2

A=


zm

Definition

A =

a11
a
21
a 31

.
.

.
.

a m1

a12
a 22
.a 32
.
.
.
.
am2

a13
a 23
.a 33
.
.
.
.
.a m 3

s1

s2

s3

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

A = ( s1 , s2 ,..., sn )

a1 j

a2 j

s j :=


amj
a1n
a 2n
a 3n

.
.

.
.

a mn

sn

Special Matrices --Square Matrix


A matrix where the number of rows is equal
to the number of columns is called a square
matrix.
1 2
2 4

6 0

4 2

1
3 2
1 3

3 5

Special Matrices --Symmetric Matrix


A square matrix such that aij = a ji for all values of i and j is called a symmetric matrix.

1 2 6
2 4 3

6 3 1

Example
Find the value of x such that the following matrix is symmetric.
0 x + 4 5
2 x 5

5 7
6

2x = x + 4

x=4

Special Matrices --Diagonal Matrix


A square matrix, in which all the elements not
on the principal diagonal are zeros, is called a
diagonal matrix.
1 0 0 0
0 4 0 0

0 0 1 0

0 0 0 5

Special Matrices --Identity Matrix


A diagonal matrix, in which every diagonal
element is 1, is called an identity matrix.
An nxn identity matrix is denoted by In or
simply I.
1 0 0 0
0 1 0 0

0 0 1 0

0 0 0 1

The role of identity matrices


in matrix world is just like
the role of 1 in real numbers.

Special Matrices --- Zero


Matrix
A matrix where every element is 0 is called a zero matrix.
An mxn zero matrix is denoted by 0mn or 0 if the order is obvious
from the context.
The zero matrix is also called the null matrix.

0 0 0 0
0 0 0 0

0 0 0 0
Note: zero matrix is not necessary a square matrix.

Special Matrices --Transpose of Matrix


The transpose AT of an mXn matrix whose
rows are the corresponding columns of A.
1 0
2 1

4 7
A

1 2 4
0 1 7

Theorem

(A )
T

A is a symmetric matrix.

=A

AT = A

Matrix Operations

Operations Btw Matrices


We can ADD, SUBTRACT and
MULTIPLY matrices.
However, unlike ordinary numbers, these
operations are dependent on the order of the
matrices involved.
There is no DIVISION of matrices.

Definition --- Equality


Two matrices equal to each other if they have
the same order and all elements in the same
position of the matrices equal to each other.

If

x 1 , then
y = 2

x =1

and

y=2

Operation 1 - Addition
4 6 1 2 4 + 1 6 + 2 5 8
8 10 + 3 4 = 8 + 3 10 + 4 = 11 14

2 4 1 1 4 9 2 + 1 4 + 4 1 + 9 3 8 10
5 1 7 + 7 5 0 = 5 + 7 1 + 5 7 + 0 = 12 6 7

6 0 8 6 3 7 6 + 6 0 + 3 8 + 7 12 3 15
2 4 1 1
5 1 7 + 3 = ?


6 0 8 4

Operation 2 - Subtraction

4 6 1 2 4 1 6 2 3 4
8 10 3 4 = 8 3 10 4 = 5 6

0 8
2 4 1 1 4 9 2 1 4 4 1 9 1
5 1 7 + 7 5 0 = 5 7 1 5 7 0 = 2 4 7

6 0 8 6 3 7 6 6 0 3 8 7 0 3 1

Operation 3
Scalar Multiplication
IMPORTANT NOTE
When a matrix is multiplied by a scalar (i.e. a number, whether
integer or non-integer), EVERY element in the matrix is
multiplied by that scalar
Example:-

1 2 2 1 2 2 2 4
2
=
=

3 4 2 3 2 4 6 8

Definition
1

0
e1 := 0 ,


0

0

1
e2 := 0 ,


0

0

0
en := 0


1

Operation 4
Matrix Multiplication
IMPORTANT NOTE
When a matrix A is multiplied by another matrix B, it is first
important to ensure that the no. of columns in matrix A is
EQUAL to the number of rows in matrix B. Otherwise, A and B
cannot be multiplied.

Example
Order 3X1

1
[2 5 7] 3 = [2 1 + 5 3 + 7 6]
6
= [2 + 15 + 42] = [59]
Order 1X3
Order 1X1
(1X3) X (3X1) = 1X1

Example
3
3 1 3 4 3 5 3 12 15
2[1 4 5] = 2 1 2 4 2 5 = 2 8 10

1
11 1 4 1 5 1 4 5
3X1

1X3

3X3

Exercise
2 1 3
1 2
= ?
(1)
1
0

0
3

4 3 1

1 2 1 2 3
(2)
=?

0 3 -1 3 5

Matrix operations
Matrix Multiplication
IMPORTANT properties of matrix multiplication
Theorem 3
Let A, B, C, 0(zero matrix) and I(identity matrix) be conformable
matrices and k be any scalar.
1.

(AB)C = A(BC)

2.

A(B + C) = AB + AC

3.

k(AB) = (kA)B = A(kB)

4.

A0 = 0

5.

AI = A

6.

(AB)T = BTAT

Matrix operations
Matrix Multiplication
IMPORTANT NOTE
(1) Matrix multiplication is NOT commutative, i.e.: AB BA
Example:Let A =

0 1
2 3

1 2
and B =

3
4

0 1 1 2 3 4
=
Then AB =

2
3
3
4
11
16

Hence AB BA

1 2 0 1 4 7
but BA =
=

3 4 2 3 8 15

Matrix operations
Matrix Multiplication
IMPORTANT NOTE
(2) Cancellation law DOES NOT apply, i.e.: If AB = AC, it DOES
NOT imply B = C
Example:Let A =

1 1
1 1

,B=

1 1
1 1

1 1 1 1 2 2
=
Then AB =

1
1
1

1
2

1 1 0 2 2 2
=
and AC =

1
1
2
0
2

and C =

0 2
2 0

So AB = AC but B C

Practice
1 2 3

Given A = 2 3 4 , find 3 A2 4 A + 5I .
3 4 5

Linear System of Equations


(LSE)

a11 x1 + a12 x2 + ... + a1n xn = b1

a21 x1 + a22 x2 + ... + a2 n xn = b2


am1 x1 + am 2 x2 + ... + amn xn = bm

a11

a21

am1

a12
a22
am 2

a1n x1 b1

a2 n x2 b2
=

amn xn bm
Ax = b

Determinants

Determinants
(Introduction)
Determinant is a special measurement/property of square matrix.
A square matrix is a matrix with the same number of rows and columns.

Determinant is denoted by:

a b

= d

If a determinant has n rows and n columns, we say it is an nth order determinant.

Evaluating 2nd order


determinants
a b
= ad bc
c d

Start with the TOP LEFT corner and multiply with BOTTOM
RIGHT corner (1)
Take TOP RIGHT corner and multiply with BOTTOM LEFT
corner (2)
Take (1) (2).

Example
Evaluate:

2 3
1 4

2 3
= 2(4) 3(1)
1 4

= 8+3
= 11

Minor of an element
The minor of an element aij is the determinant formed after
removing row i and column j containing the element,
And then forming a determinant with the FOUR remaining
elements
For example, to find the minor for a12:-

a11

a12

a13

= a21 a22

a23

a31

a33

a32

minor of a12

a21 a23
=
= a21a33 a23a31
a31 a33

Example 1
Given that the minor of 5 in the determinant is 12, determine the
value of x.

2
Minor of 5 =
x
16 + x = 12
x = 4

-1
= 2(8) ( x)(1) = 12
8

Cofactor of an element
The notation Aij is used to denote the cofactor of an element aij .

The relationship between the minor and cofactor is


cofactor of aij = (1)i+j(minor of aij )

The only difference between the minor and cofactor is that


the cofactor has the (-1)i+j term.
Thus, to find the cofactor, it is necessary to FIND THE
MINOR FIRST.

Example 2
Find the cofactors for 8 and 3 respectively in the determinant
given.

3+ 2

Cofactor of 8 = ( 1)

2
7

3
= [2(5) (3)(7)]
5

= [10 21] = 11
1+ 3

Cofactor of 3 = ( 1)
= [56 8] = 48

7
4

2
= [7(8) (2)(4)]
8

Evaluating 3rd Order


Determinant
a11

a12

a13

a21 a22

a23

a31

a33

a32

A determinant can
be evaluated via
any row or any
column

= a11 A11 + a12 A12 + a13 A13


= a21 A21 + a22 A22 + a23 A23
= a31 A31 + a32 A32 + a33 A33
= a11 A11 + a21 A21 + a31 A31
= a12 A12 + a22 A22 + a32 A32
= a13 A13 + a23 A23 + a33 A33

This process is
called Laplace
Expansion

Example 3
Expand

4 6 8
2 5 1
1 3 2

4 6 8
2 5 1
1 3 2

along row 3, using Laplace expansion

= 1(1)

3+1

6 8
8
6
3+ 2 4
3+ 3 4
+ (3)(1)
+ 2(1)
5 1
2 1
2 5

= [6 + 40] + 3[4 + 16] + 2[20 12]


= 34 + 3(12) + 2(8)
= 34 + 36 + 16
= 86

Example 4
2

Evaluate 123 1 876 using Laplace expansion.


2
= 1 (1)

0
2+ 2

= 2(5) 2(3)
=4

5
2 3
2 5

Sarrus method
a
d
g
a

b
e
h

c
f
i

b c

d e f
g h

= aei +bfg + dhc ceg bdi ahf

Note that Sarrus method applies only for 3rd order


determinants (i.e. determinants of 3x3 matrices)

Example 5
3

Solve for x given that 1 x + 1 2 = 19.


6

Using Sarrus' method to expand the determinant, we have

3( x + 1)(5) + 0(2)(6) + 1( x)(4) 4( x + 1)6 3(2) x 0(6)(5) = 19


15 x 15 + 4 x 24 x 24 + 6 x = 19

29 x 39 = 19
29 x = 58
x = 2

Evaluating higher order


determinants

Laplace expansion
a11
a21
a31

a12
a22
a32

a13 L
a23 L
a33 L

M M M O
an1 an 2 an3 L

a1n
a2 n
a3n = a11 A11 + a12 A12 + a13 A13 + ... + a1n A1n
M
= a21A21+a22A22+a23A23++a2nA2n
ann
= a11A11+a21A21+a31A31++an1An1
And so on

Note that the expansion can be done along ANY row or column
the answer should be the same regardless

Inverse of a matrix
Given a matrix A, we can find A-1 such that AA-1 = I, where I is the
identity matrix.
BUT, this is only possible if
(1) A is a square matrix
(2) the determinant of A is non-zero
Theorem
The inverse A-1 of an matrix A is given by
A-1
where

1
adj A
=
A

A is the determinant of A.

Inverse of a matrix
The adjoint of a matrix A, denoted by adjA is the transpose of the
cofactors of A, and is found by: a11 a12

If A = a 21 a 22
a31 a 32

a13
a 23
a33

then adj A =

A11
A
21
A31

A12
A22
A32

A13
A23
A33

A21

A11
A
12
A13

A31
A32
A33

where

A22
A23

Aij is the cofactor of the element a ij

Example

Given a 3X3 matrix A which satisfies equation


A2 3A + I = 0

Find

A1

Linear System of Equations


(LSE)

a11 x1 + a12 x2 + ... + a1n xn = b1

a21 x1 + a22 x2 + ... + a2 n xn = b2


am1 x1 + am 2 x2 + ... + amn xn = bm

a11

a21

am1

a12
a22
am 2

a1n x1 b1

a2 n x2 b2
=

amn xn bm
Ax = b

Potrebbero piacerti anche