Ch2 Numerical Methods Lecture Notes Part One
Ch2 Numerical Methods Lecture Notes Part One
FACULTY OF ENGINEERING
Numerical Methods
LECTURE NOTES
CHAPTER TWO
(Part one)
CLASS: Junior
FIRST SEMESTER
LECTURER: Mr. Abdiqani M. Aden (Msc in Research & Statistics; Msc in Pure Mathematics)
Introduction
A matrix is a set of numbers arranged in rows and columns so as to form a rectangular array.
The numbers are called the elements, or entries, of the matrix. Matrices have wide
applications in computer engineering, civil engineering, physics, economics, and statistics as
well as in various branches of mathematics.
For example; the following matrices:
5 8 2
A=
3 6 1
This matrix has two rows and three columns. So its referred to as 2 by 3 matrix (2 × 3).
Note: When writing or stating the dimensions or order of matrix, conventionally the number of
rows come to the first and column to the second.
The entry of rows is represented by , and columns by . So in the above matrix can be
expressed as; A = 3, A = 2, A = 6 etc.
Types of Matrices
1. Row matrix: If a matrix has one row and any number of columns, then the matrix is referred
to as row matrix. i.e A = [1 5 −3]
2. Column matrix: If a matrix has one column and any number of rows, then the matrix is
4
referred to as column matrix. i.e A = 0
−10
3. Null or zero matrix: Any matrix, in which all the elements are zero is referred to as zero and
0 0 1 −4 10
null matrix. i.e A = ,B= .
0 0 5 −1 −6
4. Square matrix: A matrix in which the number of rows equal to the number of columns.
3 1 5
2 3
i.e A = , A= 0 0 6
5 7
2 3 4
5. Diagonal matrix: A square matrix is diagonal matrix, If all it’s non-diagonal elements are
zero’s.
1 0 0
i.e A = 0 3 0
0 0 5
Example (2)
Find the values of x, y, z and m which satisfy the matrix equation.
+3 2 + 0 −7
=
−1 4 −6 3 2m
Example (3)
+3 +4 2 −7 0 6 3 −2
If −6 − 0 = −6 −3 2 +2
−3 −21 0 2 + 4 −21 0
Find the values of a, b, c, x, y and z.
Matrix Operations
Addition and Subtraction of Matrices
Corresponding elements in two matrices may be added or subtracted to form a single matrix.
Addition and subtraction is defined (possible) for matrices of the same order.
Example (4)
Add the matrices
2 −1 −3 0
a)
−7 4 7 −4
3 1 −4 2 7 −5
b) 4 3 1 −2 1 0
1 4 −3 6 3 4
Example (5)
Subtract
−3 0 2 −1
a)
7 −4 −7 4
2 7 −5 3 1 −4
b) −2 1 0 4 3 1
6 3 4 1 4 −3
Note: The matrix addition is commutative and associative. For any matrices A, B, C of the same
order (size):
A+B=B+A
A + (B + C) = (A + B) + C
The identity of matrix under addition is zero matrix.
Multiplication by scalar
A multiplication of matrix A by scalar k causes every element of matrix A to be multiplied by k.
If A = then kA = .
Example ( )
0 1 4 8
If A = 3 2 and B= 2 0 find
−1 0 3 1
a) 2A – 4B
b) -3B + A
c) A
Transpose of Matrix
If A is any × matrix, then the transpose of matrix A, denoted by A is defined to be then
n × m matrix that results from interchanging the rows and columns of matrix A. That is the
first column of matrix A is the first row of A and so on.
Example (8)
Write the transpose of the following matrices
0 1 9
A= 3 2 , B= 2
−1 0 0
c) +2
Properties of Transpose
For all equal size matrices A, B and all scalars k. Then:
1. ( ) =
2. ( ) = ( )
3. ( + ) = +
4. ( ) =
Note: A matrix for which = A is symmetric. Symmetric matrices are necessarily square
matrix × and the main diagonal is line of symmetry.
Example (10)
Which of the following matrices are symmetric.
1 −2 1 −2 1 −4 0
A= , B= and C =
−2 4 −3 4 −4 2 0
Note: Matrices which are such that A = - A, skew-symmetric. In any skew-symmetric matrix
the main diagonal elements are zeros.
Example (11)
0 −5 2
Show that that matrix A is skew-symmetric. A = 5 0 1
−2 −1 0
Example (12)
2 3 −5 7
If A = and B = find A × B.
1 −4 −3 4
Example (13)
Find the product A × B and B × A where possible.
1 0
2 1
A = −2 1 and B =
−1 −2
4 3
Example (14)
1 0 3 2 2 0
Determine 2 1 2 × 1 3 2
1 3 1 3 2 0
Identity of Matrix
The identity of order n matrix is the square matrix × whose main diagonal entries are all
zeros. For any × matrix, AI = IA = A. Where I is the identity element of the matrix
multiplication.
Example (15)
Show that AI = IA = A
1 0
A = −2 1
4 3
Example (1 )
2 3
Show that matrix A = satisfies the matrix equation A2 – 4A + I = 0, where I is the 2 × 2
1 2
matrix and 0 is the 2 × 2 zero matrix.
Example (18)
Show that ( ) =
2 4 1 3
A= and B = .
6 8 −1 2