This document defines matrices and describes common matrix operations such as addition, subtraction, scalar multiplication, and matrix multiplication. It begins by defining what a matrix is - a rectangular array of numbers. It then discusses how to perform addition and subtraction of matrices by adding/subtracting corresponding entries, provided the matrices have the same dimensions. Scalar multiplication is explained as multiplying each entry of a matrix by a constant. Matrix multiplication is defined as multiplying the rows of the first matrix by the columns of the second, provided the inner dimensions are equal. Examples are provided for each operation.
1. 7.5 Matrices and Matrix
Operations
Chapter 7 Systems of Equations and Inequalities
2. Concepts and Objectives
⚫ The objectives for this section are
⚫ Find the sum and difference of two matrices.
⚫ Find scalar multiples of a matrix.
⚫ Find the product of two matrices.
3. Introduction to Matrices
⚫ A matrix (plural matrices) is a rectangular array of
numbers enclosed in brackets. Each number is called an
element of the matrix.
⚫ A row in a matrix is a set of numbers that are aligned
horizontally. A column is a set of numbers that are
aligned vertically.
⚫ We generally use capital letters for the names of
matrices.
⚫ Examples:
1 3 1 2 7
1 2
, 4 0 , 0 5 6
3 4
5 1 7 8 2
A B C
−
= = = −
4. Introduction to Matrices (cont.)
⚫ A matrix is often referred to by its size or dimensions:
m × n indicating m rows and n columns.
⚫ Matrix entries are defined first by row and then by
column.
⚫ For example, to locate the entry in matrix A defined
as aij, we look for the entry in row I, column j in
matrix A. Shown below, the entry in row 2, column 3
is a23.
11 12 13
21 22 23
31 32 33
a a a
A a a a
a a a
=
5. Introduction to Matrices (cont.)
⚫ A square matrix is a matrix with dimensions n × n,
meaning that it has the same number of rows as
columns. The 3 × 3 matrix on the previous slide is an
example of a square matrix.
⚫ A row matrix is a matrix consisting of one row with
dimensions 1 × n:
⚫ A column matrix is a matrix consisting of one column
with dimensions m × 1:
11 12 13
a a a
11
21
31
a
a
a
6. Adding and Subtracting Matrices
⚫ We use matrices to list data or to represent systems.
Because the entries are numbers, we can perform
operations on matrices. We add or subtract matrices by
adding or subtracting corresponding entries.
⚫ In order to do this, the entries must correspond.
Therefore, addition and subtraction of matrices is
only possible when the matrices have the same
dimensions.
7. Adding and Subtracting Matrices
⚫ Example: Find the sum of A and B, given
and .
a b e f
A B
c d g h
= =
8. Adding and Subtracting Matrices
⚫ Example: Find the sum of A and B, given
Add the corresponding entries.
and .
a b e f
A B
c d g h
= =
a b e f
A B
c d g h
a e b f
c g d h
+ = +
+ +
=
+ +
9. Adding and Subtracting Matrices
⚫ Example: Find the sum and difference of A and B.
2 3 8 1
and
0 1 5 4
A B
− −
= =
10. Adding and Subtracting Matrices
⚫ Example: Find the sum and difference of A and B.
2 3 8 1
and
0 1 5 4
A B
− −
= =
( ) 6 2
2 8 3 1
5 5
0 5 1 4
A B
− + + −
+ = =
+ +
11. Adding and Subtracting Matrices
⚫ Example: Find the sum and difference of A and B.
2 3 8 1
and
0 1 5 4
A B
− −
= =
( ) 6 2
2 8 3 1
5 5
0 5 1 4
A B
− + + −
+ = =
+ +
( ) 10 4
2 8 3 1
5 3
0 5 1 4
A B
−
− − − −
− = =
− −
− −
12. Finding Scalar Multiples
⚫ Besides adding and subtracting whole matrices, there
are other situations in which we need to multiply a
matrix by a constant called a scalar.
⚫ The process of scalar multiplication involves multiplying
each entry in a matrix by a scalar.
13. Finding Scalar Multiples (cont.)
⚫ Example: A university needs to add to its inventory of
computers, computer tables, and chairs in two labs due
to increased enrollment. They estimate that 15% more
equipment is needed in both labs.
Converting the data to a
matrix, we have
Lab A Lab B
Computers 15 27
Tables 16 34
Chairs 16 34 15 27
16 34
16 34
C
=
14. Finding Scalar Multiples (cont.)
⚫ To calculate how much new equipment will be needed,
we multiply all entries in matrix C by 0.15 (15%).
⚫ Because we can’t buy partial equipment, we have to
round up to the nearest integer.
( )
( ) ( )
( ) ( )
( ) ( )
0.15 15 0.15 27 2.25 4.05
0.15 0.15 16 0.15 34 2.4 5.1
0.15 16 0.15 34 2.4 5.1
C
= =
3 5 18 32
3 6 19 40 or
3 6 19 40
C
+ =
Lab A Lab B
Computers 18 32
Tables 19 40
Chairs 19 40
15. Finding Scalar Multiples (cont.)
⚫ Example:
8 1
If , what is 3 ?
5 4
A A
=
−
8 1 24 3
3 3
5 4 15 12
A
= =
− −
6 2 4 1
If , what is ?
0 3 8 2
B B
−
=
6 2 4 3 1 2
1 1
2 2 0 3 8 0 1.5 4
B
− −
= =
16. Multiplying Two Matrices
⚫ In addition to multiplying a matrix by a scalar, we can
multiply two matrices. Finding the product of two
matrices is only possible when the inner dimensions
are the same, meaning that the number of columns of
the first matrix is equal to the number of rows of the
second matrix.
⚫ If A is an m × r matrix and B is an r × n matrix, then the
product matrix AB is an m × n matrix.
⚫ If the inner dimensions do not match, the product is not
defined.
17. Multiplying Two Matrices (cont.)
⚫ To obtain the entry cij of AB, we multiply the entries in
row i in row i of A by column j in B and add.
⚫ For example, given matrices A (2 × 3) and B (3 × 3):
⚫ To obtain the entry in row 1, column 1 of AB, multiply
the first row in A by the first column of B and add:
11 12 13
11 12 13
21 22 23
21 22 23
31 32 33
and
b b b
a a a
A B b b b
a a a
b b b
= =
11
11 12 13 21 11 11 12 21 13 31
31
b
a a a b a b a b a b
b
= + +
18. Multiplying Two Matrices (cont.)
⚫ To obtain the entry in row 1, column 2 of AB, multiply
the first row of A by the second column in B, and add.
⚫ For the entry in row 1, column 3 of AB, multiply the first
row of A by the third column of B, and add.
12
11 12 13 22 11 12 12 22 13 32
32
b
a a a b a b a b a b
b
= + +
13
11 12 13 23 11 13 12 23 13 33
33
b
a a a b a b a b a b
b
= + +
19. Multiplying Two Matrices (cont.)
⚫ In the same fashion, multiply the second row of A by the
1st, 2nd, and 3rd columns of B.
⚫ Properties
⚫ Matrix multiplication is associative:
⚫ Matrix multiplication is distributive:
⚫ Matrix multiplication is not commutative:
( ) ( )
AB C A BC
=
( )
( )
C A B CA CB
A B C AC BC
+ = +
+ = +
AB BA