Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
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 =
.
.
.
.
a m1
a12
a 22
.a 32
.
.
.
.
am2
a13
a 23
.a 33
.
.
.
.
.a m 3
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
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.
a
a
a
23
21 22
a31 a32 a33
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
6 0
4 2
1
3 2
1 3
3 5
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
0 0 1 0
0 0 0 5
0 0 1 0
0 0 0 1
0 0 0 0
0 0 0 0
0 0 0 0
Note: zero matrix is not necessary a square matrix.
4 7
A
1 2 4
0 1 7
Theorem
(A )
T
A is a symmetric matrix.
=A
AT = A
Matrix Operations
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.
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
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.
a b
= 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 .
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
a12
a13
a21 a22
a23
a31
a33
a32
A determinant can
be evaluated via
any row or any
column
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
= 1(1)
3+1
6 8
8
6
3+ 2 4
3+ 3 4
+ (3)(1)
+ 2(1)
5 1
2 1
2 5
Example 4
2
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
Example 5
3
29 x 39 = 19
29 x = 58
x = 2
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
Example
Find
A1
a11
a21
am1
a12
a22
am 2
a1n x1 b1
a2 n x2 b2
=
amn xn bm
Ax = b