Professional Documents
Culture Documents
Topic 1 QMS 112-NEW
Topic 1 QMS 112-NEW
Mobile: +255679595630/+255742987389
Email: llydia@mzumbe.ac.tz
Office : Block B-204
TOPIC 1: LINEAR ALGEBRA
OUTLINE
• Definition of a Matrix
• Operations of Matrices
• Inverse of a Matrix
• Rank
• Homogeneous system of linear equations
• Symmetric, Skew – symmetric and Orthogonal matrices.
• Eigen values and Eigen vectors, Diagonalization of matrices,
• Cayley – Hamilton Theorem.
INTRODUCTION
•
MATRIX REPRESENTATION
•
EXAMPLES OF MATRICES
1x2 matrix
1 − 1
TYPES OF MATRICES
1. Column matrix:
The number of rows may be any integer but the
number of columns is always 1.
Examples:
1 a11
4 1 a21
− 3
2 am1
TYPES OF MATRICES
2. Row matrix or vector
1 1
3
7 1 1 1 0 0
7 − 7 2
0 3 3 0
7 6
TYPES OF MATRICES
1 1 1
1 1 9 9 0
3
0
6 6 1
TYPES OF MATRICES
TYPES OF MATRICES
3 0 0 0
1 0 0 0
0 2 0 3 0 0
0 0 5 0
0 0 1
0 0 0 9
TYPES OF MATRICES
1 0 0 0
0 0
1 0 1 0
0 0 0 1 0
1
0 0 0
1
TYPES OF MATRICES
0 0 0 0
0 0 0 0
0 0 0 0
TYPES OF MATRICES
8. Triangular matrix: Is a square matrix
whose elements above or below the main
diagonal are all zero.
Examples:
1 0 0 1 0 0 1 8 9
2 1 0 2 1 0 0 1 6
5 2 3 5 2 3 0 0 3
TYPES OF MATRICES
8a. Upper triangular matrix
A square matrix whose elements below
the main diagonal are all zero. i.e. aij = 0
for all i > j.
Examples:
aij aij aij 1 8 7
0 1 8
0 aij aij
0 0 aij 0 0 3
TYPES OF MATRICES
8b. Lower triangular matrix
A square matrix whose elements above the main
diagonal are all zero. i.e, aij = 0 for all i < j.
Examples:
aij 0 0 1 0 0
2 1 0
aij aij 0
aij aij aij 5 2 3
TYPES OF MATRICES
aij 0 0 1 0 0
0 1 0
0 aij 0
0 0 aij 0 0 1
OPERATIONS OF MATRICES
OPERATIONS OF MATRICES
Equality of matrices:
Two matrices are said to be equal only when all
corresponding elements are equal.
Therefore their size or dimensions are equal as well.
Examples: 1 0 0 1 0 0
A = 2 1 0 2 1
0
B=
5 2 3
5 2 3
Then, A = B
OPERATIONS OF MATRICES
OPERATIONS OF MATRICES
•
OPERATIONS OF MATRICES
•
OPERATIONS OF MATRICES
Examples:
7 3 − 1 1 5 6 8 8 5
2 − 5 6 + − 4 − 2 3 = − 2 − 7 9
6 4 2 1 2 0 5 2 2
3 − =
2 7 1 0 8 2 2 − 1
OPERATIONS OF MATRICES
3 − 1
2 1
If k=4 and A=
2 − 3
4 1
3 − 1 3 − 1 12 −4
2 1 2 1 8 4
Then, 4 = 4 =
2 − 3 2 − 3 8 − 12
4 1 4 1 16 4
OPERATIONS OF MATRICES
MULTIPLICATION OF MATRICES
• The product of two matrices is another matrix
• Two matrices A and B must be conformable for
multiplication to be possible, i.e. the number of columns of
A must be equal the number of rows of B
• Example. A x B = C
(1x3) (3x1) (1x1)
OPERATIONS OF MATRICES
MULTIPLICATION OF MATRICES
B x A = Not possible!
(2x1) (4x2)
A x B = Not possible!
(6x2) (6x3)
OPERATIONS OF MATRICES
MULTIPLICATION OF MATRICES
b11 b12
a11 a12 a13 c11 c12
a b22 =
c22
b21
21 a22 a23
c21
b31 b32
MULTIPLICATION OF MATRICES
Example:
4 8
1 2 3 (1 4) + (2 6) + (3 5) (1 8) + (2 2) + (3 3)
4 2 7 6 2 = (4 4) + (2 6) + (7 5) (4 8) + (2 2) + (7 3)
5 3
31 21
=
63 57
OPERATIONS OF MATRICES
MULTIPLICATION OF MATRICES
Remember also:
IA = A
Example: 1 0 31 21 31 21
0 1 63 57 = 63 57
PROPERTIES OF MATRICES
•
PROPERTIES OF MATRICES
•
PROPERTIES OF MATRICES
• AB≠BA in general. However,
-If two square matrices A and B such that
AB=BA, then A and B are said to commute.
- If A and B such that AB=-BA, then A and B are
said to be anti-commute.
TRANSPOSE OF A MATRIX
If :
2 4 7
A= A =
3
2x3 2
5 3 1
2 5
A =2 A
T 3T
=
4 3
For all i and j
7 1
TRANSPOSE OF A MATIX
Properties of transposed matrices:
1. (A+B)T = AT + BT
2. (AB)T = BT AT
3. (kA)T = kAT
4. (AT)T = A
DETERMINANT OF A MATRIX
Each square matrix A has a unit scalar value called the
determinant of A, denoted by det A or |A|
1 2
If A=
6 5
1 2
then A =
6 5
DETERMINANT OF A MATRIX
• If A = [A] is a single element (1x1), then the
determinant is defined as the value of the element
Then |A| =det A = a11
DETERMINANT OF A MATRIX
MINORS
If A is an n x n matrix and one row and one column are
deleted, the resulting matrix is an (n-1) x (n-1)
submatrix of A.
The determinant of such a submatrix is called a minor
of A and is denoted by mij , where i and j correspond to
the deleted row and column, respectively.
DETERMINANT OF A MATRIX
a11 a12 a13
Example A = a21 a22 a23
.
a31 a32 a33
• Each element in A has a minor
• Delete first row and column from A .
• The determinant of the remaining 2 x 2 submatrix is
the minor of a11
a22 a23
m11 =
a32 a33
DETERMINANT OF A MATRIX
Therefore the minor of a12 is:
a21 a23
m12 =
a31 a33
And the minor for a13 is:
a21 a22
m13 =
a31 a32
DETERMINANT OF A MATRIX
COFACTORS
The cofactor Cij of an element aij is defined as:
Cij = (−1)i + j mij
When the sum of a row number i and column j is even,
cij = mij and when i+j is odd, cij =-mij
Example 1:
3 1
A=
1 2
A = (3)(2) − (1)(1) = 5
DETERMINANT OF A MATRIX
Determinant of a 3 x 3 matrix:
A = a11 (a22 a33 − a23 a32 ) − a12 (a21a33 − a23 a31 ) + a13 (a21a32 − a22 a31 )
DETERMINANT OF A MATRIX
Example 2: 1 0 1
A = 0 2 3
− 1 0 1
A = a11 (a22 a33 − a23 a32 ) − a12 (a21a33 − a23 a31 ) + a13 (a21a32 − a22 a31 )
Example:
1 2
A=
4
If
− 3
4 3
The cofactor C of A is C =
− 2 1
ADJOINT MATRICES
Definition: The adjoint matrix of A, denoted by adj A,
is the transpose of its cofactor matrix
adjA = C T
Example:
1 2
A=
− 3 4
A = (1)(4) − ( 2)(−3) = 10
4 − 2
adjA = C T
=
3 1
ADJOINT MATRICES
1 2 4 − 2 10 0
A(adjA) = 3 = = 10 I
− 3 4 1 0 10
4 − 2 1 2 10 0
(adjA) A = = = 10 I
3 1 − 3 4 0 10
INVERTIBLE(NONSINGULAR)
MATRICES
• Definition. If A is a square matrix, i.e., A has
dimensions n×n. Matrix A is nonsingular
or invertible if there exists a matrix B
such that AB=BA=In
• For example.
2 1 2 1 1 1
− + − +
1 1 3 3 3 3 3 3 1 0
= =
− 1 2 1 1 2 2 1 2 0 1
− + +
3 3 3 3 3 3
INVERTIBLE(NONSINGULAR)
MATRICES
•
ELEMENTARY ROW OPERATIONS
• Elementary row operations means adding
multiples on one equation (row) to another
(row)
• In Gaussian elimination, elementary row
operations are used to eliminate variables, one
at a time in order to reduce the matrix or
system of equations to upper triangular form so
that they may be solved by back substitution
ELEMENTARY ROW OPERATIONS
• The matrix obtained is in the form:
Example:
a1,1 a1, 2 a1,3 a1, 4
0 a2 , 2 a2 , 3 a2, 4
0 0 a3,3
a3, 4
Note: Sometimes we call row echelon forms just
as echelon forms and row echelon matrices as
echelon matrices without mentioning the word
“row.”
REDUCED ECHELON FORM MATRIX
•
REDUCED ECHELON FORM MATRIX
−1 adjA
A =
A
Determination of inverse of a matrix
using determinant method
•
adjA
A−1 =
A
Determination of inverse of a matrix
using determinant method
1 2
Example A= − 3 4
To check
AA- = A-1 A = I
Inverse of a 3 x 3 matrix:
Example 2:
3 −1 1
A=
2 1 0
1 2 − 1
The determinant of A is
|A| = (3)(-1-0)-(-1)(-2-0)+(1)(4-1) = -2
Determination of inverse of a matrix
using determinant method
and
− 1 1 − 1 0.5 − 0.5 0.5
−1 adjA 1 = − 1.0 2.0 − 1.0
A = = 2 − 4 2
A −2
3 − 7 5 − 1.5 3.5 − 2.5
Determination of inverse of a matrix
using determinant method
• The result can be checked using
AA-1 = A-1 A = I
v) Cover the pivot row and the rows above it; repeat
(i)-(iii) to the remaining submatrix.
Note that:
• To calculate the inverse of matrix A, we apply the
elementary row operations on the augmented matrix
[A I] and reduce this matrix to the form of [I B]
• The right half of this augmented matrix B is the inverse
of A
Gaussian elimination cont…
76
Gaussian elimination cont…
77
Gaussian elimination cont…
Example
1 1 1 1 1 1 |1 0 0
A = 12 2 −3 [ A | I ] = 12 2 − 3 | 0 1 0
3 4 1 3 4 1 | 0 0 1
78
78
Gaussian elimination cont…
3 1
0.4 −
35 7
− 0.6 −
2 3
35 7
1.2 −
1
−
2
35 7
79
79
INVERSE OF A MATRIX
• Task 1;
Discuss how to find inverse of a
matrix by using Cramer’s rule
RANK OF A MATRIX
RANK OF A MATRIX
• Definition: The maximum number of linearly
independent rows (number of row Pivots/
leading coefficients in the echelon form) in a
matrix A is called row rank of A.
• Definition: The maximum number of linearly
independent columns (number of column
Pivots in the echelon form) in a matrix A is
called column rank of A.
RANK OF A MATRIX
•
RANK OF A MATRIX
•
RANK OF A MATRIX
•
RANK OF A MATRIX
•
Determination of rank using row
operations method
•
Relationship between a Rank and
Inverse of matrix A
• The relationship is shown by the theorem
below:
• Theorem (Existence of the Inverse)
The inverse A−1 of an n × n matrix A exists if
and only if rank A = n, that is when det A ≠ 0.
• Hence A is nonsingular if rank A = n and is
singular if rank A < n.
HOMOGENEOUS SYSTEM OF
LINEAR EQUATIONS
System of equations in matrix form
ak1 x1 + ak 2 x2 + ak 3 x3 + + akn xn = bk
can be rewritten as the matrix equation
Ax=b, where
Systems of equations in matrix form
x1 b1
a11 a1n
x2 b2
A= , x = , b = .
a akn
k1
xn bk
Solving system of equations by
Inverse method
•
Solving system of equations by Inverse
method
Example: Solve 3 x1 − x2 + x3 = 2
2 x1 + x2 = 1
x1 + 2 x2 − x3 = 3
The equations can be expressed as
3 −1 1 x1 2
2 1 0 x2 = 1
1 2 − 1 x3 3
Solving system of equations by Inverse
method
Therefore:
x1 = 2,
x2 = −3,
x3 = −7
Solving system of equations by Inverse
method
The values for the unknowns should be checked by
substitution back into the initial equations
x1 = 2, 3 x1 − x2 + x3 = 2
x2 = −3, 2 x1 + x2 = 1
x3 = −7 x1 + 2 x2 − x3 = 3
x+ y−z =3
2x + y − z = 4
2 x + 2 y + z = 12
Solving system of equations by Gaussian
elimination method
Solution: Writing a system of equations in matrix form..
Columns contain the Coefficients of x, y, z and RHS
x y z RHS
x+ y−z =3 ...(1) 1 1 −1 3 ...(1)
2x + y − z = 4 ...(2) 2 1 −1 4 ...(2)
2 x + 2 y + z = 12 2 1 12 ...(3)
...(3) 2
1 1 −1 3 ...(1) -2 -2 2 -6 …(1) -2
2 1 −1 4 ...(2) 2 1 -1 4 …(2)
0 -1 1 -2 adding
2 2 1 12 ...(3)
1 1 −1 3 ...(1)
0 −1 1 −2 ...(2)1 Update row 2
2 2 1 12 ...(3)
EXAMPLE CONTINUED
1 1 −1 3 ...(1)
0 − 1 1 − 2 ...(2)1
0 0 ...(3)1
3 6
In this particular example,
there is already a ‘0’ beneath a 2,2 in column 2
The augmented matrix is in upper triangular form
So proceed to solve by back substitution…
EXAMPLE CONTINUED
-y + (2) = -2
…substitute z = 2 into eq. (2) -y = -2 – (2) = -4
y= 4
x + (4) – (2) = 3
substitute z = 2, y = 4 into
eq. (1) x=1
SYMMETRIC, SKEW – SYMMETRIC
AND ORTHOGONAL MATRICES
SYMMETRIC MATRICES
a b
A=
b d
a b
A =
T
b d
SKEW-SYMMETRIC MATRIX
•
ORTHOGONAL MATRIX
•
ORTHOGONAL MATRIX
•
EIGEN VALUES, EIGEN VECTORS AND
DIAGONALIZATION OF MATRICES .
EIGENVALUES AND EIGENVECTORS
Ax – x = 0
given
(A – In)x = 0
− 4 − 6 1 0 − 4 − − 6
A − I 2 = − =
3 5 0 1 3 5 −
EXAMPLE CONTINUED
− 6 − 6 x1
3 =0
3 x2
• This leads to the system of equations
− 6 x1 − 6 x2 = 0
3 x1 + 3 x2 = 0
EXAMPLE CONTINUED
x1 −1 −1
v1 = = x2 = r
x2 1 1
EXAMPLE CONTINUED
• For = –1
We solve the equation (A + 1I2)x = 0 for x.
The matrix (A + 1I2) is obtained by adding 1 to the diagonal
elements of A. We get
− 3 − 6 x1
3 =0
6 x2
• Thus x1 = –2x2.
• The solutions to this system of equations are
x1 = –2s and x2 = s, where s is a scalar.
• Thus the eigenvectors of A corresponding to = –1
are nonzero vectors of the form
x1 −2 −2
v 2 = = x2 = s
x2 1 1
DIAGONALIZATION OF MATRICES
•
DIAGONALIZATION OF MATRICES
•
DIAGONALIZATION OF MATRICES
diagonalizable.
(b)Find a diagonal matrix D that is similar to A.
(c)Determine the similarity transformation that
diagonalizes A.
DIAGONALIZATION OF MATRICES
Solution
(a)The eigenvalues and corresponding
eigenvector of this matrix were found in
example above. They are
− 1 − 2
1 = 2, v1 = r 2 = −1, and v 2 = s
1 1
Since A, a 2 2 matrix, has two linearly
independent eigenvectors, it is diagonalizable.
DIAGONALIZATION OF MATRICES
− 4 − 6 2 0
A= is similar to D =
3 5 0 − 1
DIAGONALIZATION OF MATRICES
• Example;
Compute A9 for the matrix A defined as;
− 4 − 6
A=
3 5
DIAGONALIZATION OF MATRICES
(APPLICATIONS)
Solution
• A is the matrix of the previous example. Use the values of C
and D from that example. We get
9
2 0 29 0 512 0
D9 = = =
0 −1 0 (−1)9 0 −1
A9 = CD 9C −1
−1
− 1 − 2 512 0 − 1 − 2 − 514 − 1026
= =
1 1 0 − 1 1 1 513 1025
THE CAYLEY- HAMILTON THEOREM,
CAYLEY-HAMILTON THEOREM
•
CAYLEY-HAMILTON THEOREM
EXAMPLE CONTINUED
THE END OF THE TOPIC