Learn on PengiOpenStax Algebra and TrigonometryChapter 11: Systems of Equations and Inequalities

Lesson 11.5: Matrices and Matrix Operations

In this Grade 7 math lesson from OpenStax Algebra and Trigonometry, students learn the fundamentals of matrices, including how to identify matrix dimensions, locate entries using row-column notation such as a₂₃, and classify types like square, row, and column matrices. Students then practice finding the sum and difference of two matrices by adding or subtracting corresponding entries, as well as computing scalar multiples and products of matrices. This lesson builds the foundation for using matrix operations to organize and solve real-world data problems and systems of equations.

Section 1

📘 Matrices and Matrix Operations

New Concept

Matrices are rectangular arrays used to organize data. This lesson introduces the fundamental operations you can perform on them: addition, subtraction, scalar multiplication, and matrix multiplication, each following specific rules based on matrix dimensions.

What’s next

Next, you will apply these concepts through a series of interactive examples and practice cards covering each matrix operation.

Section 2

What is a Matrix

Property

A matrix is a rectangular array of numbers that is usually named by a capital letter: AA, BB, CC, and so on. Each entry in a matrix is referred to as aija_{ij}, such that ii represents the row and jj represents the column. Matrices are often referred to by their dimensions: m×nm \times n indicating mm rows and nn columns.

Examples

  • Given matrix A=[514902]A = \begin{bmatrix} 5 & -1 & 4 \\ 9 & 0 & 2 \end{bmatrix}, the dimensions are 2×32 \times 3 (2 rows, 3 columns). The entry at a13a_{13} is 4.
  • A matrix with dimensions 3×33 \times 3 like B=[123456789]B = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix} is called a square matrix because it has the same number of rows and columns.

Section 3

Finding the Sum and Difference of Two Matrices

Property

Given matrices AA and BB of like dimensions, addition and subtraction of AA and BB will produce matrix CC or matrix DD of the same dimension.

A+B=Csuch thataij+bij=cijA + B = C \quad \text{such that} \quad a_{ij} + b_{ij} = c_{ij}
AB=Dsuch thataijbij=dijA - B = D \quad \text{such that} \quad a_{ij} - b_{ij} = d_{ij}

Matrix addition is commutative (A+B=B+AA + B = B + A) and associative ((A+B)+C=A+(B+C)(A + B) + C = A + (B + C)). Addition and subtraction are only possible when matrices have the same dimensions.

Examples

  • Find the sum of A=[3815]A = \begin{bmatrix} 3 & 8 \\ 1 & 5 \end{bmatrix} and B=[2041]B = \begin{bmatrix} 2 & 0 \\ 4 & -1 \end{bmatrix}. The sum is [3+28+01+451]=[5854]\begin{bmatrix} 3+2 & 8+0 \\ 1+4 & 5-1 \end{bmatrix} = \begin{bmatrix} 5 & 8 \\ 5 & 4 \end{bmatrix}.
  • Find the difference of A=[10259]A = \begin{bmatrix} 10 & 2 \\ 5 & 9 \end{bmatrix} and B=[4631]B = \begin{bmatrix} 4 & 6 \\ 3 & 1 \end{bmatrix}. The difference is [104265391]=[6428]\begin{bmatrix} 10-4 & 2-6 \\ 5-3 & 9-1 \end{bmatrix} = \begin{bmatrix} 6 & -4 \\ 2 & 8 \end{bmatrix}.

Section 4

Finding Scalar Multiples of a Matrix

Property

Scalar multiplication involves finding the product of a constant by each entry in the matrix. Given

A=[a11a12a21a22]A = \begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix}

the scalar multiple cAcA is

cA=[ca11ca12ca21ca22]cA = \begin{bmatrix} c a_{11} & c a_{12} \\ c a_{21} & c a_{22} \end{bmatrix}

Scalar multiplication is distributive. For the matrices AA, BB, and CC with scalars aa and bb,

a(A+B)=aA+aBa(A + B) = aA + aB
(a+b)A=aA+bA(a + b)A = aA + bA

Examples

  • Multiply matrix A=[62103]A = \begin{bmatrix} 6 & 2 \\ 10 & 3 \end{bmatrix} by the scalar 4. The result is 4A=[464241043]=[2484012]4A = \begin{bmatrix} 4 \cdot 6 & 4 \cdot 2 \\ 4 \cdot 10 & 4 \cdot 3 \end{bmatrix} = \begin{bmatrix} 24 & 8 \\ 40 & 12 \end{bmatrix}.
  • Given B=[5140]B = \begin{bmatrix} 5 & -1 \\ -4 & 0 \end{bmatrix}, find 3B-3B. The result is 3B=[353(1)3(4)30]=[153120]-3B = \begin{bmatrix} -3 \cdot 5 & -3 \cdot (-1) \\ -3 \cdot (-4) & -3 \cdot 0 \end{bmatrix} = \begin{bmatrix} -15 & 3 \\ 12 & 0 \end{bmatrix}.

Section 5

Finding the Product of Two Matrices

Property

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 AA is an m×rm \times r matrix and BB is an r×nr \times n matrix, then the product matrix ABAB is an m×nm \times n matrix. To obtain the entry in row ii, column jj of ABAB, multiply the entries in row ii of AA by the corresponding entries in column jj of BB and add the results.

Examples

  • Given A=[1234]A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} and B=[5601]B = \begin{bmatrix} 5 & 6 \\ 0 & 1 \end{bmatrix}, their product is AB=[1(5)+2(0)1(6)+2(1)3(5)+4(0)3(6)+4(1)]=[581522]AB = \begin{bmatrix} 1(5)+2(0) & 1(6)+2(1) \\ 3(5)+4(0) & 3(6)+4(1) \end{bmatrix} = \begin{bmatrix} 5 & 8 \\ 15 & 22 \end{bmatrix}.
  • Given A=[102]A = \begin{bmatrix} 1 & 0 & 2 \end{bmatrix} and B=[789]B = \begin{bmatrix} 7 \\ 8 \\ 9 \end{bmatrix}, the product ABAB is defined because their dimensions are 1×31 \times 3 and 3×13 \times 1. The result is [1(7)+0(8)+2(9)]=[25]\begin{bmatrix} 1(7)+0(8)+2(9) \end{bmatrix} = \begin{bmatrix} 25 \end{bmatrix}.

Section 6

Properties of Matrix Multiplication

Property

For the matrices AA, BB, and CC the following properties hold.

  • Matrix multiplication is associative: (AB)C=A(BC)(AB)C = A(BC).
  • Matrix multiplication is distributive: C(A+B)=CA+CBC(A + B) = CA + CB, (A+B)C=AC+BC(A + B)C = AC + BC.

Note that matrix multiplication is not commutative.

Examples

  • Let A=[1203]A = \begin{bmatrix} 1 & 2 \\ 0 & 3 \end{bmatrix} and B=[4150]B = \begin{bmatrix} 4 & 1 \\ 5 & 0 \end{bmatrix}. Then AB=[1(4)+2(5)1(1)+2(0)0(4)+3(5)0(1)+3(0)]=[141150]AB = \begin{bmatrix} 1(4)+2(5) & 1(1)+2(0) \\ 0(4)+3(5) & 0(1)+3(0) \end{bmatrix} = \begin{bmatrix} 14 & 1 \\ 15 & 0 \end{bmatrix}.
  • Using the same matrices, BA=[4(1)+1(0)4(2)+1(3)5(1)+0(0)5(2)+0(3)]=[411510]BA = \begin{bmatrix} 4(1)+1(0) & 4(2)+1(3) \\ 5(1)+0(0) & 5(2)+0(3) \end{bmatrix} = \begin{bmatrix} 4 & 11 \\ 5 & 10 \end{bmatrix}. Notice that ABBAAB \neq BA.

Book overview

Jump across lessons in the current chapter without opening the full course modal.

Continue this chapter

Chapter 11: Systems of Equations and Inequalities

  1. Lesson 1

    Lesson 11.1: Systems of Linear Equations: Two Variables

  2. Lesson 2

    Lesson 11.2: Systems of Linear Equations: Three Variables

  3. Lesson 3

    Lesson 11.3: Systems of Nonlinear Equations and Inequalities: Two Variables

  4. Lesson 4

    Lesson 11.4: Partial Fractions

  5. Lesson 5Current

    Lesson 11.5: Matrices and Matrix Operations

  6. Lesson 6

    Lesson 11.6: Solving Systems with Gaussian Elimination

  7. Lesson 7

    Lesson 11.7: Solving Systems with Inverses

  8. Lesson 8

    Lesson 11.8: Solving Systems with Cramer's Rule

Lesson overview

Expand to review the lesson summary and core properties.

Expand

Section 1

📘 Matrices and Matrix Operations

New Concept

Matrices are rectangular arrays used to organize data. This lesson introduces the fundamental operations you can perform on them: addition, subtraction, scalar multiplication, and matrix multiplication, each following specific rules based on matrix dimensions.

What’s next

Next, you will apply these concepts through a series of interactive examples and practice cards covering each matrix operation.

Section 2

What is a Matrix

Property

A matrix is a rectangular array of numbers that is usually named by a capital letter: AA, BB, CC, and so on. Each entry in a matrix is referred to as aija_{ij}, such that ii represents the row and jj represents the column. Matrices are often referred to by their dimensions: m×nm \times n indicating mm rows and nn columns.

Examples

  • Given matrix A=[514902]A = \begin{bmatrix} 5 & -1 & 4 \\ 9 & 0 & 2 \end{bmatrix}, the dimensions are 2×32 \times 3 (2 rows, 3 columns). The entry at a13a_{13} is 4.
  • A matrix with dimensions 3×33 \times 3 like B=[123456789]B = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix} is called a square matrix because it has the same number of rows and columns.

Section 3

Finding the Sum and Difference of Two Matrices

Property

Given matrices AA and BB of like dimensions, addition and subtraction of AA and BB will produce matrix CC or matrix DD of the same dimension.

A+B=Csuch thataij+bij=cijA + B = C \quad \text{such that} \quad a_{ij} + b_{ij} = c_{ij}
AB=Dsuch thataijbij=dijA - B = D \quad \text{such that} \quad a_{ij} - b_{ij} = d_{ij}

Matrix addition is commutative (A+B=B+AA + B = B + A) and associative ((A+B)+C=A+(B+C)(A + B) + C = A + (B + C)). Addition and subtraction are only possible when matrices have the same dimensions.

Examples

  • Find the sum of A=[3815]A = \begin{bmatrix} 3 & 8 \\ 1 & 5 \end{bmatrix} and B=[2041]B = \begin{bmatrix} 2 & 0 \\ 4 & -1 \end{bmatrix}. The sum is [3+28+01+451]=[5854]\begin{bmatrix} 3+2 & 8+0 \\ 1+4 & 5-1 \end{bmatrix} = \begin{bmatrix} 5 & 8 \\ 5 & 4 \end{bmatrix}.
  • Find the difference of A=[10259]A = \begin{bmatrix} 10 & 2 \\ 5 & 9 \end{bmatrix} and B=[4631]B = \begin{bmatrix} 4 & 6 \\ 3 & 1 \end{bmatrix}. The difference is [104265391]=[6428]\begin{bmatrix} 10-4 & 2-6 \\ 5-3 & 9-1 \end{bmatrix} = \begin{bmatrix} 6 & -4 \\ 2 & 8 \end{bmatrix}.

Section 4

Finding Scalar Multiples of a Matrix

Property

Scalar multiplication involves finding the product of a constant by each entry in the matrix. Given

A=[a11a12a21a22]A = \begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix}

the scalar multiple cAcA is

cA=[ca11ca12ca21ca22]cA = \begin{bmatrix} c a_{11} & c a_{12} \\ c a_{21} & c a_{22} \end{bmatrix}

Scalar multiplication is distributive. For the matrices AA, BB, and CC with scalars aa and bb,

a(A+B)=aA+aBa(A + B) = aA + aB
(a+b)A=aA+bA(a + b)A = aA + bA

Examples

  • Multiply matrix A=[62103]A = \begin{bmatrix} 6 & 2 \\ 10 & 3 \end{bmatrix} by the scalar 4. The result is 4A=[464241043]=[2484012]4A = \begin{bmatrix} 4 \cdot 6 & 4 \cdot 2 \\ 4 \cdot 10 & 4 \cdot 3 \end{bmatrix} = \begin{bmatrix} 24 & 8 \\ 40 & 12 \end{bmatrix}.
  • Given B=[5140]B = \begin{bmatrix} 5 & -1 \\ -4 & 0 \end{bmatrix}, find 3B-3B. The result is 3B=[353(1)3(4)30]=[153120]-3B = \begin{bmatrix} -3 \cdot 5 & -3 \cdot (-1) \\ -3 \cdot (-4) & -3 \cdot 0 \end{bmatrix} = \begin{bmatrix} -15 & 3 \\ 12 & 0 \end{bmatrix}.

Section 5

Finding the Product of Two Matrices

Property

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 AA is an m×rm \times r matrix and BB is an r×nr \times n matrix, then the product matrix ABAB is an m×nm \times n matrix. To obtain the entry in row ii, column jj of ABAB, multiply the entries in row ii of AA by the corresponding entries in column jj of BB and add the results.

Examples

  • Given A=[1234]A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} and B=[5601]B = \begin{bmatrix} 5 & 6 \\ 0 & 1 \end{bmatrix}, their product is AB=[1(5)+2(0)1(6)+2(1)3(5)+4(0)3(6)+4(1)]=[581522]AB = \begin{bmatrix} 1(5)+2(0) & 1(6)+2(1) \\ 3(5)+4(0) & 3(6)+4(1) \end{bmatrix} = \begin{bmatrix} 5 & 8 \\ 15 & 22 \end{bmatrix}.
  • Given A=[102]A = \begin{bmatrix} 1 & 0 & 2 \end{bmatrix} and B=[789]B = \begin{bmatrix} 7 \\ 8 \\ 9 \end{bmatrix}, the product ABAB is defined because their dimensions are 1×31 \times 3 and 3×13 \times 1. The result is [1(7)+0(8)+2(9)]=[25]\begin{bmatrix} 1(7)+0(8)+2(9) \end{bmatrix} = \begin{bmatrix} 25 \end{bmatrix}.

Section 6

Properties of Matrix Multiplication

Property

For the matrices AA, BB, and CC the following properties hold.

  • Matrix multiplication is associative: (AB)C=A(BC)(AB)C = A(BC).
  • Matrix multiplication is distributive: C(A+B)=CA+CBC(A + B) = CA + CB, (A+B)C=AC+BC(A + B)C = AC + BC.

Note that matrix multiplication is not commutative.

Examples

  • Let A=[1203]A = \begin{bmatrix} 1 & 2 \\ 0 & 3 \end{bmatrix} and B=[4150]B = \begin{bmatrix} 4 & 1 \\ 5 & 0 \end{bmatrix}. Then AB=[1(4)+2(5)1(1)+2(0)0(4)+3(5)0(1)+3(0)]=[141150]AB = \begin{bmatrix} 1(4)+2(5) & 1(1)+2(0) \\ 0(4)+3(5) & 0(1)+3(0) \end{bmatrix} = \begin{bmatrix} 14 & 1 \\ 15 & 0 \end{bmatrix}.
  • Using the same matrices, BA=[4(1)+1(0)4(2)+1(3)5(1)+0(0)5(2)+0(3)]=[411510]BA = \begin{bmatrix} 4(1)+1(0) & 4(2)+1(3) \\ 5(1)+0(0) & 5(2)+0(3) \end{bmatrix} = \begin{bmatrix} 4 & 11 \\ 5 & 10 \end{bmatrix}. Notice that ABBAAB \neq BA.

Book overview

Jump across lessons in the current chapter without opening the full course modal.

Continue this chapter

Chapter 11: Systems of Equations and Inequalities

  1. Lesson 1

    Lesson 11.1: Systems of Linear Equations: Two Variables

  2. Lesson 2

    Lesson 11.2: Systems of Linear Equations: Three Variables

  3. Lesson 3

    Lesson 11.3: Systems of Nonlinear Equations and Inequalities: Two Variables

  4. Lesson 4

    Lesson 11.4: Partial Fractions

  5. Lesson 5Current

    Lesson 11.5: Matrices and Matrix Operations

  6. Lesson 6

    Lesson 11.6: Solving Systems with Gaussian Elimination

  7. Lesson 7

    Lesson 11.7: Solving Systems with Inverses

  8. Lesson 8

    Lesson 11.8: Solving Systems with Cramer's Rule