Matrices
Matrices
MATRICES
Prepared
By Mrs. A. F. Mohammed
What is a 1
A Matrix is an array of
numbers. It is an array of
Matrix? numbers written in a bracket
either ( ) or [ ] type brackets
2
A Matrix has rows and columns
( 7
9
6
2 ) 3
4
A row goes horizontal (left to
right
2
In the diagram shown we have 3 rows and 2
columns
Matrix
3 This will be a 3×2 matrix
A=
4 The numbers show where each number is located
in the matrix = 1, the number in the 1st row and 1st
column. Similarly, = 7, the number in the 3rd row
and 2nd colum
Example 1: Consider the following example
life problem) 1 10 18
2 25 28
A=
• In a matrix A=
• Find
• 1) The size of the matrix A (i.e. Row x Column)
• 2) The number of elements in the matrix A ( amount of numbers in the matrix)
• 3) Write the elements at
Adding or Subtracting Matrices 6
A+B= + =
A–B= - =
Addition and Subtraction Exercise 7
Find:
• A= 1) A + B
• B= 2) B – A
• C= 3) D + C
• D= 4) C – D
• E= 5) Can E be added to any of the matrices
labelled A to D? Explain your answer.
Multiplying a • We can multiply a matrix by a constant (the value 2 8
in this case)
Matrix by a Z=
Find 2 × Z
constant 2×Z=2×
2Z =
2Z =
• We call the constant a scalar, so officially this is
called "scalar multiplication"
Multiplying a Matrix by another Matrix 9
• But to multiply a matrix by another matrix we need to do the "dot product" of rows and
columns ... what does that mean? Let us see with an example:
• The "Dot Product" is where we multiply matching members, then sum up:
(1, 2, 3) • (7, 9, 11) = 1×7 + 2×9 + 3×11 = 58
• We match the 1st members (1 and 7), multiply them, likewise for the 2nd members (2 and 9)
and the 3rd members (3 and 11), and finally sum them up.
Want to see another example? Here it is for the 1st row and 2nd column: 10
We can do the same thing for the 2nd row and 1st column:
And we get:
You may have noticed when we multipled 2 different sizes of matrices and got a differently 11
sized matrix.
The 1st matrix was a 2 x 3 ( 2 rows, 3 columns) and the 2nd was a 3 x 2 ( 3rows, 2 columns)
when multiplied our result was a 2 x 2 matrix (2 rows, 2 colomns)
In General:
To multiply an m×n matrix by an n×p matrix, the n’s must be the same,
and the result is an m×p matrix. Matrices multiply rows
Multiplying 2 Matrices examples 12
I×A=A
Order of Multiplication 14