Solved Exercises on Matrix Multiplication in Precalculus

Master matrix multiplication: compatibility, calculation methods, and applications through these 5 detailed exercises with comprehensive solutions and visual representations.

Solution: Exercises 1 to 3
1 Basic 2×2 matrix multiplication
Exercise 1
Find \(AB\) where \(A = \begin{bmatrix} 2 & 1 \\ 3 & 4 \end{bmatrix}\) and \(B = \begin{bmatrix} 1 & 0 \\ 2 & 3 \end{bmatrix}\)
Definition:

Matrix multiplication: The operation of multiplying two matrices where the element in position (i,j) of the result is the dot product of row i of the first matrix and column j of the second matrix. For matrices A (m×n) and B (n×p), the result AB is (m×p).

Matrix multiplication method:
  1. Verify compatibility: number of columns in A must equal number of rows in B
  2. For each position (i,j) in the result: compute dot product of row i of A with column j of B
  3. Place the result in position (i,j) of the product matrix
  4. Continue for all positions in the result matrix
Matrices
\(A = \begin{bmatrix} 2 & 1 \\ 3 & 4 \end{bmatrix}\), \(B = \begin{bmatrix} 1 & 0 \\ 2 & 3 \end{bmatrix}\)
Formula
\((AB)_{ij} = \sum_{k=1}^{n} A_{ik}B_{kj}\)
Result
\(AB = \begin{bmatrix} 4 & 3 \\ 11 & 12 \end{bmatrix}\)
Step 1: Check compatibility

Matrix A is 2×2 and matrix B is 2×2. Since A has 2 columns and B has 2 rows, multiplication is possible. Result will be 2×2.

Step 2: Calculate element (1,1) of AB

Dot product of row 1 of A with column 1 of B: \((2)(1) + (1)(2) = 2 + 2 = 4\)

Step 3: Calculate element (1,2) of AB

Dot product of row 1 of A with column 2 of B: \((2)(0) + (1)(3) = 0 + 3 = 3\)

Step 4: Calculate element (2,1) of AB

Dot product of row 2 of A with column 1 of B: \((3)(1) + (4)(2) = 3 + 8 = 11\)

Step 5: Calculate element (2,2) of AB

Dot product of row 2 of A with column 2 of B: \((3)(0) + (4)(3) = 0 + 12 = 12\)

\(AB = \begin{bmatrix} 4 & 3 \\ 11 & 12 \end{bmatrix}\)
Final answer:

\(AB = \begin{bmatrix} 4 & 3 \\ 11 & 12 \end{bmatrix}\)

Applied rules:

• Compatibility requirement: Inner dimensions must match

• Element calculation: \((AB)_{ij} = \sum A_{ik}B_{kj}\)

• Dot product: Multiply corresponding elements and sum

2 Compatible dimensions
Exercise 2
Find \(CD\) where \(C = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix}\) and \(D = \begin{bmatrix} 7 \\ 8 \\ 9 \end{bmatrix}\)
Definition:

Dimension compatibility: For matrix multiplication AB, the number of columns in A must equal the number of rows in B. If A is (m×n) and B is (n×p), then AB is (m×p).

Matrices
\(C = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix}\), \(D = \begin{bmatrix} 7 \\ 8 \\ 9 \end{bmatrix}\)
Dimensions
C(2×3) × D(3×1) = (2×1) result
Result
\(CD = \begin{bmatrix} 50 \\ 122 \end{bmatrix}\)
Step 1: Verify dimensions

Matrix C is 2×3 (2 rows, 3 columns) and matrix D is 3×1 (3 rows, 1 column). Since C has 3 columns and D has 3 rows, multiplication is possible. Result will be 2×1.

Step 2: Calculate element (1,1) of CD

Row 1 of C · Column 1 of D: \((1)(7) + (2)(8) + (3)(9) = 7 + 16 + 27 = 50\)

Step 3: Calculate element (2,1) of CD

Row 2 of C · Column 1 of D: \((4)(7) + (5)(8) + (6)(9) = 28 + 40 + 54 = 122\)

Step 4: Assemble the result matrix

Since the result is 2×1, we have a column vector with 2 elements

\(CD = \begin{bmatrix} 50 \\ 122 \end{bmatrix}\)
Final answer:

\(CD = \begin{bmatrix} 50 \\ 122 \end{bmatrix}\)

Applied rules:

• Dimension rule: A(m×n) × B(n×p) = C(m×p)

• Compatibility: Inner dimensions must match (3 = 3)

• Result dimensions: Outer dimensions determine result size (2×1)

3 Incompatible multiplication
Exercise 3
Explain why \(EF\) cannot be calculated where \(E = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}\) and \(F = \begin{bmatrix} 5 & 6 & 7 \\ 8 & 9 & 10 \end{bmatrix}\)
Definition:

Incompatible matrices: Two matrices cannot be multiplied if the number of columns in the first matrix does not equal the number of rows in the second matrix.

Matrix E
2×2 matrix (2 rows, 2 columns)
Matrix F
2×3 matrix (2 rows, 3 columns)
Compatibility
Not possible (2 ≠ 3)
Step 1: Identify dimensions of E

Matrix E is 2×2 (has 2 columns)

Step 2: Identify dimensions of F

Matrix F is 2×3 (has 2 rows)

Step 3: Check compatibility rule

Number of columns in E (2) ≠ Number of rows in F (2) ❌

Actually, let me recalculate: E has 2 columns, F has 2 rows. This should be compatible!

Step 4: Verify compatibility

Wait, E is 2×2 (2 columns) and F is 2×3 (2 rows). The inner dimensions match (2 = 2), so multiplication IS possible!

Result would be 2×3 (outer dimensions)

Multiplication IS possible: E(2×2) × F(2×3) = (2×3) result
Correction:

Actually, \(EF\) CAN be calculated! E is 2×2 and F is 2×3, so the inner dimensions (2) match. The result would be a 2×3 matrix.

Applied rules:

• Compatibility rule: A(m×n) × B(n×p) is possible when inner dimensions match

• Dimension verification: Always double-check matrix dimensions

• Result dimensions: A(m×n) × B(n×p) = C(m×p)

Matrix Multiplication: Laws, Methods, and Formulas
\((AB)_{ij} = \sum_{k=1}^{n} A_{ik}B_{kj}\)
Matrix Multiplication Formula
\(A_{m \times n} \times B_{n \times p} = C_{m \times p}\)
Dimension Compatibility
Identity Matrix
\(AI = IA = A\)
Multiplication by identity
Non-commutativity
\(AB \neq BA\) in general
Order matters
Associativity
\(A(BC) = (AB)C\)
Grouping doesn't matter
Key definitions:

Matrix multiplication: The fundamental operation of combining two matrices to produce a third matrix, where each element of the result is computed as the dot product of a row from the first matrix with a column from the second matrix. This operation is only possible when the number of columns in the first matrix equals the number of rows in the second matrix.

Compatibility: The requirement that for matrix multiplication AB, the number of columns in A must equal the number of rows in B. If A is (m×n) and B is (n×p), then AB is possible and results in a (m×p) matrix.

Dot product: The scalar result of multiplying corresponding elements of two vectors and summing them: \(\vec{u} \cdot \vec{v} = u_1v_1 + u_2v_2 + \ldots + u_nv_n\).

Element calculation: The formula for computing element (i,j) in the product matrix: \((AB)_{ij} = \sum_{k=1}^{n} A_{ik}B_{kj}\), where the sum runs over the common dimension.

Identity matrix: A square matrix with 1s on the main diagonal and 0s elsewhere, which acts as the multiplicative identity for matrix multiplication.

Zero matrix: A matrix where all elements are zero, which acts as an absorbing element for matrix multiplication (A×0 = 0×A = 0).

Complete methodology for matrix multiplication:
  1. Check compatibility: Verify that the number of columns in the first matrix equals the number of rows in the second matrix
  2. Determine result dimensions: The product will have the same number of rows as the first matrix and the same number of columns as the second matrix
  3. Compute each element: For position (i,j), calculate the dot product of row i of the first matrix with column j of the second matrix
  4. Organize calculations: Work systematically through each position in the result matrix
  5. Verify result: Check that the dimensions are correct and calculations make sense
Tip 1: Always verify dimensions before starting: (m×n) × (n×p) = (m×p).
Tip 2: Matrix multiplication is NOT commutative: AB ≠ BA in general.
Tip 3: The dot product is the core operation: multiply corresponding elements and sum them.
Tip 4: Organize your work by computing one row of the result at a time.
Tip 5: Remember that multiplying by the identity matrix leaves the original matrix unchanged.
Tip 6: If the dot product of a row and column is zero, that element in the result is zero.
Common errors: Attempting multiplication with incompatible dimensions, misapplying the dot product formula, confusing row and column selection, incorrect sign handling, forgetting that order matters, treating matrix multiplication like scalar multiplication, not organizing calculations systematically.
Applications: Computer graphics (transformations, rotations), engineering (system modeling), physics (quantum mechanics, transformation matrices), economics (input-output models), cryptography (matrix-based encryption), data science (linear transformations), machine learning (neural network layers), signal processing (filtering operations).
Properties to know by heart:

• Multiplication formula: \((AB)_{ij} = \sum_k A_{ik}B_{kj}\)

• Dimension rule: A(m×n) × B(n×p) = C(m×p)

• Non-commutativity: AB ≠ BA in general

• Associativity: A(BC) = (AB)C

• Distributivity: A(B + C) = AB + AC

• Identity property: AI = IA = A

• Zero property: A0 = 0A = 0

Solution: Exercises 4 to 5
4 Three matrix multiplication
Exercise 4
Find \(ABC\) where \(A = \begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix}\), \(B = \begin{bmatrix} 2 & 0 \\ 1 & 3 \end{bmatrix}\), and \(C = \begin{bmatrix} 1 \\ 1 \end{bmatrix}\)
Definition:

Multiple matrix multiplication: The process of multiplying three or more matrices, which is possible due to the associative property: A(BC) = (AB)C.

Matrices
A(2×2), B(2×2), C(2×1)
First product
\(AB = \begin{bmatrix} 4 & 6 \\ 1 & 3 \end{bmatrix}\)
Final product
\(ABC = \begin{bmatrix} 10 \\ 4 \end{bmatrix}\)
Step 1: Calculate AB (first multiplication)

\(AB = \begin{bmatrix} (1)(2)+(2)(1) & (1)(0)+(2)(3) \\ (0)(2)+(1)(1) & (0)(0)+(1)(3) \end{bmatrix} = \begin{bmatrix} 4 & 6 \\ 1 & 3 \end{bmatrix}\)

Step 2: Verify dimensions for next multiplication

AB is 2×2 and C is 2×1, so (AB)C is possible with result 2×1

Step 3: Calculate (AB)C

\((AB)C = \begin{bmatrix} (4)(1)+(6)(1) \\ (1)(1)+(3)(1) \end{bmatrix} = \begin{bmatrix} 10 \\ 4 \end{bmatrix}\)

Step 4: Verify using alternative grouping

Could also compute A(BC) and get the same result due to associativity

\(ABC = \begin{bmatrix} 10 \\ 4 \end{bmatrix}\)
Final answer:

\(ABC = \begin{bmatrix} 10 \\ 4 \end{bmatrix}\)

Applied rules:

• Associativity: A(BC) = (AB)C

• Dimension compatibility: Verify at each step

• Sequential multiplication: Multiply two matrices at a time

5 Identity and zero matrices
Exercise 5
If \(I_2 = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}\) and \(O_2 = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}\), find \(AI_2\) and \(AO_2\) where \(A = \begin{bmatrix} 3 & 5 \\ 2 & 4 \end{bmatrix}\)
Definition:

Identity and zero properties: Special matrix multiplication properties: \(AI = A\) and \(AO = O\), where I is the identity matrix and O is the zero matrix.

Matrix A
\(A = \begin{bmatrix} 3 & 5 \\ 2 & 4 \end{bmatrix}\)
Identity result
\(AI_2 = A\)
Zero result
\(AO_2 = O_2\)
Step 1: Calculate \(AI_2\)

\(AI_2 = \begin{bmatrix} (3)(1)+(5)(0) & (3)(0)+(5)(1) \\ (2)(1)+(4)(0) & (2)(0)+(4)(1) \end{bmatrix} = \begin{bmatrix} 3 & 5 \\ 2 & 4 \end{bmatrix} = A\)

Step 2: Calculate \(AO_2\)

\(AO_2 = \begin{bmatrix} (3)(0)+(5)(0) & (3)(0)+(5)(0) \\ (2)(0)+(4)(0) & (2)(0)+(4)(0) \end{bmatrix} = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix} = O_2\)

Step 3: Verify identity property

Multiplying by the identity matrix preserves the original matrix

Step 4: Verify zero property

Multiplying by the zero matrix always results in the zero matrix

\(AI_2 = A\), \(AO_2 = O_2\)
Final answer:

\(AI_2 = \begin{bmatrix} 3 & 5 \\ 2 & 4 \end{bmatrix}\) and \(AO_2 = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}\)

Applied rules:

• Identity property: \(AI = IA = A\)

• Zero property: \(AO = OA = O\)

• Special matrices: Identity acts as multiplicative identity, zero acts as absorbing element

Matrix Multiplication: Comprehensive Summary and Rules
\((AB)_{ij} = \sum_{k=1}^{n} A_{ik}B_{kj}\)
Matrix Multiplication Formula
Key definitions:

Matrix multiplication: The fundamental operation of combining two matrices to produce a third matrix, where each element of the result is computed as the dot product of a row from the first matrix with a column from the second matrix. This operation is only possible when the number of columns in the first matrix equals the number of rows in the second matrix.

Compatibility: The requirement that for matrix multiplication AB, the number of columns in A must equal the number of rows in B. If A is (m×n) and B is (n×p), then AB is possible and results in a (m×p) matrix.

Dot product: The scalar result of multiplying corresponding elements of two vectors and summing them: \(\vec{u} \cdot \vec{v} = u_1v_1 + u_2v_2 + \ldots + u_nv_n\).

Element calculation: The formula for computing element (i,j) in the product matrix: \((AB)_{ij} = \sum_{k=1}^{n} A_{ik}B_{kj}\), where the sum runs over the common dimension.

Identity matrix: A square matrix with 1s on the main diagonal and 0s elsewhere, which acts as the multiplicative identity for matrix multiplication.

Zero matrix: A matrix where all elements are zero, which acts as an absorbing element for matrix multiplication (A×0 = 0×A = 0).

Complete methodology for matrix multiplication:
  1. Check compatibility: Verify that the number of columns in the first matrix equals the number of rows in the second matrix
  2. Determine result dimensions: The product will have the same number of rows as the first matrix and the same number of columns as the second matrix
  3. Compute each element: For position (i,j), calculate the dot product of row i of the first matrix with column j of the second matrix
  4. Organize calculations: Work systematically through each position in the result matrix
  5. Verify result: Check that the dimensions are correct and calculations make sense
Tip 1: Always verify dimensions before starting: (m×n) × (n×p) = (m×p).
Tip 2: Matrix multiplication is NOT commutative: AB ≠ BA in general.
Tip 3: The dot product is the core operation: multiply corresponding elements and sum them.
Tip 4: Organize your work by computing one row of the result at a time.
Tip 5: Remember that multiplying by the identity matrix leaves the original matrix unchanged.
Tip 6: If the dot product of a row and column is zero, that element in the result is zero.
Common errors: Attempting multiplication with incompatible dimensions, misapplying the dot product formula, confusing row and column selection, incorrect sign handling, forgetting that order matters, treating matrix multiplication like scalar multiplication, not organizing calculations systematically.
Applications: Computer graphics (transformations, rotations), engineering (system modeling), physics (quantum mechanics, transformation matrices), economics (input-output models), cryptography (matrix-based encryption), data science (linear transformations), machine learning (neural network layers), signal processing (filtering operations).
Key relationships: Matrix multiplication is closely related to linear transformations, systems of linear equations, and geometric operations. The result represents how one transformation followed by another affects a vector space.
Memorization aids: "Inner dimensions must match" for compatibility; "Rows of first, columns of second" determine result dimensions; "Dot product of row and column" for element calculation.
Essential properties and formulas to know by heart:

• Multiplication formula: \((AB)_{ij} = \sum_k A_{ik}B_{kj}\)

• Dimension rule: A(m×n) × B(n×p) = C(m×p)

• Non-commutativity: AB ≠ BA in general

• Associativity: A(BC) = (AB)C

• Distributivity: A(B + C) = AB + AC

• Identity property: AI = IA = A

• Zero property: A0 = 0A = 0

• Transpose property: \((AB)^T = B^T A^T\)

Visualization: Matrix Multiplication Concepts
Understanding Matrix Multiplication Geometrically
Visualizing how matrix multiplication works:
- Dimension compatibility
- Row-column dot products
- Result matrix formation
- Linear transformation effects

Analysis: The visualization demonstrates how matrix multiplication combines transformations and how the dimensions must align for the operation to be valid. Each element in the result matrix represents a dot product of corresponding row and column vectors.

  • Compatibility: Inner dimensions must match
  • Dot products: Multiply and sum corresponding elements
  • Result dimensions: Outer dimensions determine result size
  • Transformation: Represents linear transformation of space

Questions & Answers

Question: Why can't I multiply matrices in any order like I can with numbers? Why is AB ≠ BA?

Answer: This is a fundamental difference between matrix and scalar multiplication! Here's why:

Dimension constraints: Even if both AB and BA are possible, they might have different dimensions. For example, if A is 2×3 and B is 3×2, then AB is 2×2 but BA is 3×3 - they can't be equal!

Different operations: In AB, you're combining rows of A with columns of B. In BA, you're combining rows of B with columns of A. These are different calculations even when dimensions match.

Example: Let \(A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}\) and \(B = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}\)

\(AB = \begin{bmatrix} (1)(0)+(2)(1) & (1)(1)+(2)(0) \\ (3)(0)+(4)(1) & (3)(1)+(4)(0) \end{bmatrix} = \begin{bmatrix} 2 & 1 \\ 4 & 3 \end{bmatrix}\)

\(BA = \begin{bmatrix} (0)(1)+(1)(3) & (0)(2)+(1)(4) \\ (1)(1)+(0)(3) & (1)(2)+(0)(4) \end{bmatrix} = \begin{bmatrix} 3 & 4 \\ 1 & 2 \end{bmatrix}\)

As you can see, AB ≠ BA! This non-commutativity is a key feature of matrix multiplication.

Question: How do I remember which row and column to use when calculating an element in the product matrix?

Answer: Use the position notation! For element (i,j) in the product AB:

Row i of matrix A: Use the i-th row of the first matrix A

Column j of matrix B: Use the j-th column of the second matrix B

Think of it as "destination coordinates determine source elements":

  • Element (1,2) in AB uses row 1 of A and column 2 of B
  • Element (3,1) in AB uses row 3 of A and column 1 of B
  • Element (2,3) in AB uses row 2 of A and column 3 of B

The subscripts tell you exactly which row and column to combine. This systematic approach prevents confusion about which elements to multiply together.

Question: What happens if I try to multiply two matrices that aren't compatible? How do I know when multiplication isn't possible?

Answer: Matrix multiplication is only possible when the "inner dimensions" match:

Compatibility rule: For A(m×n) × B(p×q), multiplication is possible only if n = p (columns of A = rows of B).

Examples of incompatibility:

  • (2×3) × (4×2): Not possible because 3 ≠ 4
  • (3×2) × (5×4): Not possible because 2 ≠ 5
  • (2×4) × (3×2): Not possible because 4 ≠ 3

What happens: If you attempt to multiply incompatible matrices, you won't be able to perform the dot product operations because the vectors won't have the same number of elements. The operation is undefined mathematically.

Always check compatibility before attempting multiplication: count columns of the first matrix and compare to rows of the second matrix.

Question: How is matrix multiplication related to linear transformations? I've heard they're connected.

Answer: Matrix multiplication is the mathematical foundation for composing linear transformations!

Single transformation: A matrix A represents a linear transformation that maps vectors from one space to another.

Composition of transformations: If A transforms space X to Y, and B transforms space Y to Z, then BA represents the combined transformation from X to Z.

Example: If A is a rotation matrix and B is a scaling matrix, then BA represents "scale then rotate". The order matters because transformations are applied from right to left.

Geometric interpretation: Each matrix multiplication represents how one geometric operation (rotation, reflection, scaling, shearing) followed by another affects points in space. The resulting matrix encapsulates the combined effect of both operations.

This connection is fundamental to computer graphics, physics simulations, and engineering applications.