Lecture 7
Lecture 7
Lecture 7
Engineering Analysis
Lecture 7
Lecture outline
• Matrix and Matrix
operations
• Rules of matrix
arithmetic
• Determinants
Definition: A matrix is a
rectangular array of
numbers
2 2 2 2
-2 0 -2 0 sin(2)
-1 -1 -1 -1 e
2 2
2 2
A= -2 0 C= 2 2
-1 -1
In a square matrix m = n
a11 a12….… a1n
A= a21 a22….… a2n a11, a22….… ann are on the main diagonal
: : :
an1 an2….… ann
Definition 1: equal matrices
• Matrix are said to be equal if they
have: (i) the same size, and (ii) the
corresponding entries in the two
matrices are equal.
2 2 1 2 2 2 1
A= -2 0 B= -2 0 C= -2 0 2
-1 -1 3 -1 -1 -1 2
2 2 1 2 2 2 1
A= -2 0 B= -2 0 C= -2 0 2
-1 -1 3 -1 -1 -1 2
3 4
A+C and B+C are A+B= -4 0
undefined
2 -2
Definition 3: matrix scalar product
• If A is any matrix and c any scalar, then the product cA is
the matrix obtained by multiplying each entry of A by c.
2 2 4 4
A= -2 0 2A= -4 0
-1 -1 -2 -2
-2 -2
(-1)A=-A= 2 0
1 1
Definition 4: Product of two matrices
4 1 4 3
1 2 4
A= B= 0 -1 3 1
2 6 0
2 7 5 2
A x B =?
4 1 4 3
1 2 4 =
2 6 0 0 -1 3 1 26
2 7 5 2
(2x4)+(6x3)+(0x5)=26
4 1 4 3 13
1 2 4 =
2 6 0 0 -1 3 1 26
2 7 5 2
(1x3)+(2x1)+(4x2)=13
Class assignment 1
complete the product computation
4 1 4 3 13
1 2 4 =
2 6 0 0 -1 3 1 26
2 7 5 2
Class assignment 1 Solution
4 1 4 3 12 27 30 13
1 2 4 =
2 6 0 0 -1 3 1 8 -4 26 12
2 7 5 2
A B = AB
inside
outside
Transpose of a matrix At
a11 a12 a13 a14
1 5 2 6 1 3
D= -1 0 1 E= -1 1 2
3 2 4 4 1 3
Let F ED,
f1,1 6x1 1x 1 3x 3 6 1 9 14 f1,2 6x 5 1x 0 3x 2 30 6 36 f1,3 6x 2 1x1 3x 4 12 1 12 25
f 2,1 1x1 1x 1 2 x 3 1 1 6 4 f 2,2 -1x5 1x0 2x2 -5 4 -1 f 2,3 1x 2 1x1 2x 4 2 1 8 7
f3,1 4 x1 1x 1 3x 3 4 1 9 12 f3,2 4x 5 1x 0 3x 2 20 6 26 f3,3 4x 2 1x1 3x 4 8 1 12 21
14 36 25
DE 4 1 7
12 26 21
Class assignment problem 3 Determine D+E
1 5 2 6 1 3
D= -1 0 1 E= -1 1 2
3 2 4 4 1 3
7 6 5
D E 2 1 3
7 3 7
Rules of matrix arithmetic
-1 0 1 2
A= B=
2 3 3 0
-1 -2 3 6
AB= BA=
11 4 -3 0
Then: AB=BA
The following rules of matrix
arithmetic are valid
(assuming that the sizes of the matrices are such
that the indicated operations can be performed )
• (a) A+B=B+A
• (b) A+(B+C)=(A+B)+C
• (c) A(BC)=(AB)C
• (d) A(B±C)=AB±AC
• (e) (B±C)A=BA±CA
• (f) a(B±C)=aB±aC
• (g) (a±b)C=aC±bC
• (h (ab)C=a(bC)
• (i) a(BC)=(aB)C=B(aC)
Identity matrix:
square matrix with 1’s on the main
diagonal and 0’s off the main
diagonal
1 0 0 0
1 0 1 0 0
I2 = I3 = I4 = 0 1 0 0
0 1 0 1 0
0 0 1 0 0 1 0
0 0 0 1
Then we define
a11 a12
det(A)= = det(A)= a11a22 -a12a21
a21 a22
a11 a12
a21 a22
Example 1
5 4
A=
3 2
Then we define
5 4
det(A)= = det(A)= 5X2-4X3=-2
3 2
5 4
3 2
Duplicate column method – for 3x3
• Let -1 2 3
A= 4 1 -6
-3 5 2
-1 2 3
A= 4 1 -6
-3 5 2
1 2 3 -1 2
A 4 1 6 4 1 1x1x 2 2 x 6 x 3 3x 4x 5 3x1x 3 1x 6 x 5 2 x 4 x 2
3 5 2 -3 5
2 36 60 9 30 16 94 37 57
Inverse of a 2x2 matrix
If A is a 2x2
matrix a11 a12
A=
a21 a22
Then we define
a22 -a12
Inv(A)= A-1= / det(A)
-a21 a11
Example 2
5 4
A=
3 2
Then we define
5 4
det(A)= = det(A)= 5X2-4X3=-2
3 2
2 -4
Inv(A)= / -2
-3 5
-1 2
A-1=
3/2 -5/2
Class assignment 5
3 4
5 6
• Find the matrix A.
Class assignment 5 Solution
3 4
A
-1
, det(A -1
) 3x 6 4 x 5 18 20 2
5 6
6 4
5 3
3 2
A• Find the matrix A.
2 5 / 2 3 / 2