CMClearMathAcademy

Matrix Basics: Add, Subtract, Multiply

A free College Algebra lesson from the “Systems, Matrices, and Linear Programming” unit, with a worked example and practice problems including step-by-step solutions.

A matrix is a rectangular array of numbers. ADD and SUBTRACT element-by-element (matrices must have the same dimensions). SCALAR multiplication multiplies every entry. MATRIX multiplication is row-by-column: the (i, j) entry of AB is the dot product of row i of A and column j of B. For AB to exist, columns of A must equal rows of B.

What you'll learn

Why it matters: 3D graphics transformations, statistics, machine learning, economics input-output models, and quantum mechanics all use matrices as their basic tool.

Worked example

Problem. Given A = [[1, 2], [3, 4]] and B = [[5, 6], [7, 8]], find the (1, 1) entry of A + B.

  1. A + B is element-wise: A[1][1] + B[1][1] = 1 + 5.
  2. = 6.

Answer: 6

Lesson preview: this page shows 5 practice items. The interactive activity contains 28 practice items and 15 quiz items (typed response and multiple choice). Counts include repeated prompts and variants.

Practice problems

1. [[1, 2], [3, 4]] + [[5, 6], [7, 8]]. Enter the (1, 1) entry of the sum.

Show solution
  1. 1 + 5 = 6.

Answer: 6

2. Same sum. (2, 2) entry?

Show solution
  1. 4 + 8 = 12.

Answer: 12

3. [[1, 2], [3, 4]] - [[5, 6], [7, 8]]. Enter the (1, 1) entry of the difference.

Show solution
  1. 1 - 5 = -4.

Answer: -4

4. Scalar 3 times [[1, -2], [4, 0]]. (1, 2) entry?

Show solution
  1. 3 * -2 = -6.

Answer: -6

5. Scalar -2 times [[1, 2], [3, 4]]. (2, 1) entry?

Show solution
  1. -2 * 3 = -6.

Answer: -6

Practice this interactively with instant feedback and an AI tutor.

Practice Matrix Basics: Add, Subtract, Multiply Take the free placement check

More College Algebra lessons