Professional Documents
Culture Documents
Lesson 1
Lesson 1
Lesson 1
LESSON 1
MATRICES
LEARNING OBJECTIVE
What is a matrix?
• A Matrix is just rectangular arrays of real number
• The numbers in the array are called the entries in the matrix
• The horizontal entries in a matrix are called rows and the vertical
are called column.
• written within a set of [ ] brackets, and arranged into a pattern of
rows and columns. For example:
a11 a12 a13 ....a1n
a a a ....a
2 n General Form of a Matrix of Size m x n with m Rows
A= 21 22 23
: : and n Columns
am1 am 2 am 3 ...amn
Square Matrix
•If m = n, the matrix is said to be square. In this
case, the matrix could be designated as an m x m
matrix.
Am,m
Matrices find many application in scientific fields and apply to practical
real life problems as well , thus making an indispensable concept for
solving many practical problems.
Sizing a matrix
• By convention matrices are “sized” using the number of rows (r) by
number of columns (c).
• Two numbers (rows x columns) describe the dimensions or size of the
matrix.
2 -3 5
A=
-1 4 6
•The matrix has 2 rows and 3 columns. Its size is 2 x 3.
Example 2:
Determine the size of the matrix shown below.
2 1
B = 7 -4
3 1
Example 3:
Determine the size of the matrix shown
below.
2 -1 3
C = 4 6
1
-5 2 1
Mathematics for Computations
Types of Matrices
1.Column matrix or Vector:
• The number of rows may be any integer but the number of columns is
always 1
18 16
5 3
3 2X1
3X1
Mathematics for Computations
Types of Matrices
2. Row matrix or vector
• Any number of columns but only one row
4 3
1X2
0 3 5 2
1X4
Mathematics for Computations
Types of Matrices
3. Rectangular matrix
• A matrix whose row and column are not equal
1 1
3 7 1 1 1 0 0
2 0 3 3 0
7 −7
7 6 2X5
4X2 rc
Mathematics for Computations
Types of Matrices
4. Square matrix
• The number of rows is equal to the number of columns
• mxn matrix in which r = c
5 2 2
2 1 1
3x3 1 1 2
Mathematics for Computations
Types of Matrices
5. Diagonal matrix
• A square matrix where all the elements are zero except those on the
main diagonal
3 0 0 0
1 0 0 0 3 0 0
0
2 0 0 0 5 0
0 0 1 0 9
0 0
i.e. aij =0 for all i ≠ j
aij ≠ 0 for some or all i = j
Mathematics for Computations
Types of Matrices
6. Identity matrix - I
• A square diagonal matrix whose elements principal elements are
equal to 1 .
1 0 0 0
0 1 0 1 0
0 aij 0
0 0 1 0 0 1 0
aij
0
1
0 0
i.e. aij =0 for all i ≠ j
aij = 1 for some or all i = j
Mathematics for Computations
Types of Matrices
7. Null (zero) matrix - 0
• All elements in the matrix are zero
0 0 0 0
0 0 0 0
0
0 0 0
Types of Matrices
8. Scalar matrix
• A diagonal matrix whose main diagonal elements are equal to the
same
• A scalar is defined as a single number or constant
3 0 0
0 3 0 2 0
0 0 3 0 2
Mathematics for Computations
Transpose a Matrix
• Matrix Transpose: if A= 𝑎𝑖𝑗 is an rXc matrix, then the transpose of
𝑇 𝑇
A, 𝐴𝑇 = 𝑎𝑗𝑖 is the rXc matrix defined by 𝑎𝑖𝑗 = 𝑎𝑗𝑖
Mathematics for Computations
Matrices Operations
MATRIX OPERATION
• Matrix algebra has operation called
▪ Addition
▪ Substration
▪ Multiplication
No division in matrix algebra , instead there is matrix
inversion.
Matrix Equality
• This the case provided that the two matrices are the same
order (size)
Matrix Equality (cont)
• If 𝐴 = 𝑎𝑖𝑗 and B= 𝑏𝑖𝑗 are equal if they have the same
𝑟𝑋𝑐 𝑟𝑋𝑐
order and if 𝑎𝑖𝑗 =𝑎𝑖𝑗 for all i and j.
• Thus the equality
5𝑥 + 2𝑦 7
• =
𝑥 − 3𝑦 1
• Implies that
5𝑥 + 2𝑦 = 7 𝑎𝑛𝑑 𝑥 − 3𝑦 = 1
Mathematics for Computations
A + B = aij + bij
A − B = aij − bij
Additional Matrices
EXAMPLE:
4 −3 1 −1 2 3 4 − (−1) −3 − 2 1− 3
0−6
0 5 −2 − 6 −7 9 5 − ( −7) −2 − 9
5 − 0 −6 − (−4) 0 − 8
5 −6 0 0 −4 8
5 −5 −2
−6 12 −11
5 −2 −8
Mathematics for Computations
Exercise 1:
Given A and B ,
5 1 −6 3
A= 7 3 B= 2 −1
−2 −1 4 1
Find the :
1) A+B
2) B-A
Exercise 2:
Given Matrix A and B
2 4 6 0 2 3
A= 1 3 5 𝐵 = −7 8 −4
9 10 11 2 1 −11
Find the :
1) B+ A
2) A-B
Critical thinking:
2 7 −12 5 1
A= 1 −3 5 B= 7 3
8 10 10 −2 −1
• 1) A + B = B + A
• 2) A + ( B + C ) = ( A + B ) + C
• 3) A + 0 = A
Commutative Law
• Matrix addition is not directional (commutative ) that is
• A+B=B+A
•𝐴−𝐵 ≠𝐵−𝐴
Mathematics for Computations
Matrix Multiplication
Matrix Multiplication
Matrix Multiplication
B x A = Not possible!
(2x1) (4x2)
A x B = Not possible!
(6x2) (6x3)
Example
A x B = C
(2x3) (3x2) (2x2)
Matrix Multiplication
Example,
3 2
6 1 0
A= and B= 3 −1
−1 2 1
−3 4
2X3 3X2
same order
• The matrix product C= AB is defined it will become AB is 2X2
Example (Cont)
3 1
3 2
A= B= 4 −4
3 −1
2 0
−3 4 3 6
3X2 4X2
Exercise 3:
2
a) 3 × 6 4 3
4
1 2 5 6 7
b) ×
3 4 8 9 10
Mathematics for Computations
Exercise 3:
1 2 3 1 2 1
c) 4 5 6 × 2 4 6
7 8 9 7 2 5
4 9
3 1 1 4
6 8
d) 5 3 2 1 ×
9 7
6 2 9 5 7 6