1 Matrices and Determinants SJK

You might also like

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

Lecture 1

Matrices and Determinants

MO 091204 -Mathematic Engineering


Sujantoko
Ocean Engineering ITS

1.1
1.2
13
1.3
1.4

Matrices
Operations of matrices
T
Types
of
f matrices
t i
Properties
p
of
f matrices

1.5

Determinants

1.6

Inverse of a 33 matrix

1 1 Matrices
1.1
2 3 7
A=

1 1 5

1 3 1
B = 2 1 4
4 7 6

Both A and B are examples of matrix


matrix. A matrix is a
rectangular array of numbers enclosed by a pair of bracket.

Why matrix?

1 1 Matrices
1.1
Consider the following set of equations:

x + y = 7,

3x y = 5.
How about solving

It is easy to show that x = 3 and y = 4.


x + y 2 z = 7,
2 x y 4 z = 2,

5 x + 4 y + 10 z = 1,
3 x y 6 z = 5.

Matrices can help


help

1 1 Matrices
1.1
In the matrix

a11
a
A = 21
M

am1

a12
a22
am 2

K a1n
a2 n

amn

numbers aijj are called elements. First subscript indicates the


row; second subscript indicates the column. The matrix
consists of mn elements
It is called the m n matrix A = [aij] or simply the matrix
A if number of rows and columns are understood.

1 1 Matrices
1.1
Square
q
matrices
a11
a
A = 21
M

an1

When m = n, i.e.,

a12
a22
an 2

K a1n
a2 n

ann

A is called a square matrix of order n or n-square


matrix
elements a11, a22, a33,, ann called diagonal elements.

a
i =1

ii

= a11 + a22

is called the trace of A.


A
+ ... +

ann

1 1 Matrices
1.1
Equal
q
matrices
Two matrices A = [[aij] and B = [[bij] are said to be equal
q
(A = B) if each element of A is equal to the corresponding
element of B, i.e., aij = bij for 1 i m, 1 j n.
if pronouns if and only if
if A = B,
B it implies aij = bij for 1 i m,
m 1 j n;
if aij = bij for 1 i m, 1 j n, it implies A = B.

1 1 Matrices
1.1
Equal
q
matrices
Example:

1 0
A=
and

4
2

a b
B=

c
d

Given that A = B, find a, b, c and d.


if A = B, then a = 1, b = 0, c = -4 and d = 2.

1 1 Matrices
1.1
Zero matrices
Everyy element of a matrix is zero, it is called a zero matrix,
i.e.,
0 0 K 0
0 0

A=
M
O

0
0
0

12O
1.2
Operations
ti
of
f matrices
t i
Sums of matrices
If A = [aij] and B = [bij] are m n matrices, then A + B
i defined
is
d fi d as a matrix
t i C = A + B,
B where
h C= [cij],
] cij = aij
+ bij for 1 i m, 1 j n.
Example: if

1 2 3
A=
and
0
1
4

2 3 0
B=

1
2
5

Evaluate A + B and A B.
2 + 3 3 + 0 3 5 3
1+ 2
=
A+ B =

+
+

0
(
1)
1
2
4
5
1
3
9

2 3 3 0 1 1 3
1 2
=
A B =

0
(
1)
1
2
4
5
1
1
1

12O
1.2
Operations
ti
of
f matrices
t i
Sums of matrices
Two matrices of the same order are said to be
conformable for
f addition
dditi or subtraction.
bt ti
Two matrices of different orders cannot be added or
subtracted,
b
d e.g.,
2 3 7
1 1 5

1 3 1
2 1 4

4 7 6

are NOT conformable


f
bl ffor addition
ddi i or subtraction.
b
i

12O
1.2
Operations
ti
of
f matrices
t i
Scalar multiplication
p
Let be any scalar and A = [aij] is an m n matrix. Then
A = [aij] for
f 1 i m,
m 1 j n,
n i.e.,
i eachh element
l
t iin
A is multiplied by .
Example:

1 2 3
A=

0
1
4

. Evaluate 3A.
3A

3 1 3 2 3 3 3 6 9
3A =
=

0
3

1
3

4
0
3
12

In particular,
particular = 1,
1 i.e.,
i e A = [aij].
] It
Itss called the
negative of A. Note: A = 0 is a zero matrix

12O
1.2
Operations
ti
of
f matrices
t i
Properties
Matrices A, B and C are conformable,
A + B = B + A

(commutative law)

A
A + (B +C)
C) = (A + B) +C
C

((associative law))

(A + B) = A + B, where is a scalar
(distributive law)
C you prove them?
Can
h ?

12O
1.2
Operations
ti
of
f matrices
t i
Properties
Example: Prove (A + B) = A + B.
B
Let C = A + B, so cijj = aijj + bijj.
Consider cij = (aij + bij ) = aij + bij, we have, C =
A + B.
Since C = (A + B), so (A + B) = A + B

12O
1.2
Operations
ti
of
f matrices
t i
Matrix multiplication
p
If A = [aij] is a m p matrix and B = [bij] is a p n
matrix,
t i then
th AB is
i defined
d fi d as a m n matrix
t i C = AB,
AB
wherep C= [cij] with
cij = aik bkj = ai1b1 j + ai 2b2 j + ... + aip bpj
k =1

Example:
p
Evaluate c21.

1 2 3
A=
,
0 1 4
1
1 2 3
0 1 4 2

for 1 i m,
m 1 j n.
n

1 2
B = 2 3 and C = AB.
5 0
2
3 c21 = 0 (1) + 1 2 + 4 5 = 22
0

12O
1.2
Operations
ti
of
f matrices
t i
Matrix multiplication
p
1 2
1 2 3
Example: A = , B = 2 3, Evaluate C = AB.
AB
0 1 4
5 0
c11 = 1 (1)) + 2 2 + 3 5 = 18
1 2
c = 1 2 + 2 3 + 3 0 = 8
1 2 3
12
2
3

0 1 4

5 0
c21 = 0 (1) + 1 2 + 4 5 = 22

c22 = 0 2 + 1 3 + 4 0 = 3

1 2
1 2 3
18 8

C = AB =
2 3 =

0
1
4
22
3

5 0

12O
1.2
Operations
ti
of
f matrices
t i
Matrix multiplication
p
In particular, A is a 1 m matrix and B is a m
1 matrix,
t i i.e.,
i
b11
A = [ a11

a12 ... a1m ]

b
B = 21
M

bm1

then C = AB is a scalar.
m

C = a1k bk1 = a11b11 + a12b21 + ... + a1mbm1


k =1

12O
1.2
Operations
ti
of
f matrices
t i
Matrix multiplication
BUT BA is a m m matrix!
b11
b
BA = 21 [ a11
M

bm1

a12

b11a11 b11a12 K b11a1m


b a

b
a
b
a
21 12
21 1m
... a1m ] = 21 11
M

b
a
b
a
b
a
m1 1m
m1 11 m1 12

So AB BA in general !

12O
1.2
Operations
ti
of
f matrices
t i
Properties:
p
:
Matrices A, B and C are conformable,
A(B + C) = AB + AC
(A
(A + B)C = AC + BC
A(BC) = (AB) C
AB BA in general
AB = 0 NOT necessarilyy imply
p y A = 0 or B = 0
AB = AC NOT necessarily imply B = C

12O
1.2
Operations
ti
of
f matrices
t i
Properties
Example: Prove A(B + C) = AB + AC where A, B and C
are n-square matrices
Let X = B + C, so xij = bij + cij. Let Y = AX, then
n

k =1

k =1

yij = aik xkj = aik (bkj + ckj )


n

k =1

k =1

k =1

= (aik bkj + aik ckj ) = aik bkj + aik ckj

S Y = AB + AC;
So
AC therefore,
h f
A(B + C) = AB + AC

1 3T
1.3
Types off matrices
i
Identity
d i matrix
i
The inverse of a matrix
The transpose of a matrix
Symmetric
S
t i matrix
t i
Orthogonal matrix

1.3 Types of matrices


Identity matrix
A
A square matrix whose elements aij = 0,
0 for i > j is
called upper triangular, i.e.,
a11 a12
0

a22
0

K a1n
a2 n

ann

A square matrix whose elements aij = 0, for i < j is


called lower triangular, i.e.,
a11 0 K
a
21
M

an1

a22
an 2

0
0

ann

1.3 Types of matrices


Identity matrix
Both
Both upper and lower triangular
triangular, ii.e.,
e aij = 0,
0 for i j , i.e.,
ie
a11
0
D=
M

0
0

ann

0 K
a22
0

is called a diagonal matrix, simply


D = diag[a11 , a22 ,..., ann ]

1.3 Types of matrices


Identity matrix
In particular, a11 = a22 = = ann = 1, the matrix is
called identity matrix.
Properties: AI = IA = A
Examples
l off identity
d
matrices:

1 0
d
0 1 and

1 0 0
0 1 0

0 0 1

1.3 Types of matrices


Special square matrix
AB
AB BA in general
general. However
However, if two square matrices A
and B such that AB = BA, then A and B are said to be
commute.
Can you suggest two matrices that must commute with a
square matrix
t i A?
Ans: A itself, the identity matrix, ..

If A and B such that AB = -BA, then A and B are said to


b anti-commute.
be
i

1.3 Types of matrices


Th iinverse off a matrix
The
i
If
If matrices A and B such that AB = BA = I,
I then B is
called the inverse of A (symbol: A-1); and A is called the
inverse of B ((symbol:
y
B-1)).
Example:
p

1 2 3
A = 1 3 3
1 2 4

6 2 3
B = 1 1 0
1 0 1

Show B is the the inverse of matrix A.


1 0 0
AB = BA = 0 1 0
Ans: Note that
0 0 1
Can you show the
details?

1.3 Types of matrices


Th transpose off a matrix
The
i
The
The matrix obtained by interchanging the rows and
columns of a matrix A is called the transpose of A (write
AT).
)
Example:

1 2 3
A=

4
5
6

The transpose of A is

1 4
AT = 2 5
3 6

For a matrix A = [aij], its transpose AT = [bij], where bij


= aji.

1.3 Types of matrices


S
Symmetric
i matrix
i
A
A matrix A such that AT = A is called symmetric,
symmetric ii.e.,
e aji =
aij for all i and j.
A + AT mustt be
b symmetric.
t i Why?
Wh ?
Example:

1 2 3
A = 2 4 is symmetric.
5
symmetric
3 5 6

A matrix A such that AT = -A


A is called skew-symmetric,
skew symmetric
i.e., aji = -aij for all i and j.
A
A - AT must be
b skew-symmetric.
k
Wh
Why?

1.3 Types of matrices


Orthogonal matrix
A
A matrix A is called orthogonal if AAT = ATA = I,
I i.e.,
i e AT =
A-1
Example: prove that

Since,

1/ 3

T
A = 1/ 6

1/ 2

1/ 3 1/ 6

A = 1/ 3 2 / 6

1/ 3 1/ 6

1/ 2

is
0

1/ 2

orthogonal.

1/ 3

2 / 6 1/ 6 . Hence, AAT = ATA = I.

0
1/ 2
Can you show the
details?
1/ 3

Well see that orthogonal matrix represents a


rotation in fact!

1 4 Properties off matrix


1.4
(AB)-1 = B-1A-1
(A
( T)T = A and (A))T = AT
(A + B)T = AT + BT
(AB)T = BT AT

1 4 Properties off matrix


1.4
Example: Prove (AB)-1 = B-1A-1.
Since (AB) (B-1A-1) = A(B B-1)A-1 = I and
(B-1A-1) (AB) = B-1(A-1 A)B = I.
Therefore B-11A-11 is the inverse of matrix AB.
Therefore,
AB

1.5 Determinants
Determinant of order 2
Consider a 2 2 matrix:
Determinant of A,
A denoted
evaluated by
a11
| A |=
a21

a11
A=
a21

a12
a22

| A, is| a number and can be

a12
= a11 a22 a12 a21
a22

1.5 Determinants
Determinant of order 2
easy to remember (for order 2 only)..
a11
| A |=
a21
-

a12
= + a11 a22 a12 a21
a22
+

Example: Evaluate the determinant:


1 2
= 1 4 2 3 = 2
3 4

1 2
3 4

1.5 Determinants
The following properties are true for determinants of any
order.
1 If every element
1.
l
off a row ((column)
l
) iis zero,
e.g.,

1 2
= 1 0 2 0 = 0
0 0

2 |AT| = |A|
2.
3. |AB| = |A||B|

, then |A| = 0.

determinant of a matrix = that


p
of its transpose

1.5 Determinants
Example: Show that the determinant of any orthogonal
matrix is either +1 or 1.
For any orthogonal matrix,
matrix A AT = I.
Since |AAT| = |A||AT | = 1 and |AT| = |A|, so |A|2 = 1 or |A| =
1.

1.5 Determinants
For any 2x2 matrix

a11
A=
a21

a12
a22
a22
a
21

Its inverse can be written as

1
A =
A

Example: Find the inverse of

1 0
A=

1
2

The determinant of A is -2
Hence, the inverse of A is
H to ffindd an inverse ffor a 33x33 matrix?
How

0
1
A =

1/ 2 1/ 2
1

a12
a11

1.5 Determinants of order 3


1 2 3
A = 4 5 6
7 8 9

Consider an example:

Its determinant can be obtained by:


1 2 3
A = 4 5 6 =3

7 8 9

4 5
7 8

1 2
7 8

+9

1 2
4 5

= 3 ( 3 ) 6 ( 6 ) + 9 ( 3 ) = 0

You are encouragedd tto fifindd th


Y
the ddeterminant
t i t bby using
i other
th
rows or columns

1.6 Inverse of a 33 matrix


1 2 3
A = 0 4 5
1 0 6

Cofactor matrix of

The cofactor for each element of matrix A:


A11 =

4 5
0 6

= 24

2 3
A21 =
= 12
0 6
A31 =

2 3
4 5

= 2

A12 =

0 5
1 6

=5

1 3
A22 =
=3
1 6
A32 =

1 3
0 5

= 5

A13 =

0 4
1 0

= 4

1 2
A23 =
=2
1 0
A33 =

1 2
0 4

=4

1.6 Inverse of a 33 matrix


Cofactor matrix of

1 2 3
A = 0 4 5 is then given by:
1 0 6

24 5 4
12 3 2

2 5 4

1.6 Inverse of a 33 matrix


Inverse matrix of

1 2 3
A = 0 4 5 is given by:
1 0 6

24 5 4
24 12 2
1
1

1
A =

12
3
2
=
5
3

A
22
2 5 4
4 2
4
T

12 11 6 11 1 11
= 5 22 3 22 5 22
2 11 1 11
2 11

You might also like