Pre-Calculus

Vector and Matrix Operations

Pre-Calculus

  • ✓By the end of this lesson students will be able to perform addition, subtraction, and scalar multiplication of vectors.
  • ✓By the end of this lesson students will be able to perform addition, subtraction, and scalar multiplication of matrices.
  • ✓By the end of this lesson students will be able to determine if matrix multiplication is possible and perform it when applicable.
  • ✓By the end of this lesson students will be able to understand and apply the properties of vector and matrix operations.

Key concepts

Vector Addition and Subtraction

Vectors are added or subtracted component-wise. To add two vectors, add their corresponding components. To subtract two vectors, subtract their corresponding components. This applies to vectors of any dimension (e.g., 2D or 3D).

If u = <u1, u2> and v = <v1, v2>, then u + v = <u1+v1, u2+v2> and u - v = <u1-v1, u2-v2>.
Scalar Multiplication of Vectors

To multiply a vector by a scalar (a real number), multiply each component of the vector by that scalar. This scales the magnitude of the vector.

If u = <u1, u2> and c is a scalar, then c * u = <c*u1, c*u2>.
Matrix Addition and Subtraction

Matrices can be added or subtracted only if they have the exact same dimensions (same number of rows and same number of columns). The operation is performed element-wise, meaning you add or subtract the corresponding elements in each matrix.

If A = [aij] and B = [bij] are m x n matrices, then A + B = [aij + bij] and A - B = [aij - bij].
Scalar Multiplication of Matrices

To multiply a matrix by a scalar, multiply every element (entry) in the matrix by that scalar.

If A = [aij] is an m x n matrix and c is a scalar, then c * A = [c*aij].
Matrix Multiplication

The product of two matrices A and B, denoted AB, is defined only if the number of columns in matrix A is equal to the number of rows in matrix B. If A is an m x n matrix and B is an n x p matrix, then their product AB will be an m x p matrix. The element in the i-th row and j-th column of AB is found by taking the dot product of the i-th row of A and the j-th column of B.

If A = [aij] is m x n and B = [bij] is n x p, then the element (AB)ij = sum(aik * bkj) for k=1 to n.

Key facts to remember

  • 1Vector addition, subtraction, and scalar multiplication are performed component-wise.
  • 2Matrix addition and subtraction require matrices to have identical dimensions.
  • 3Scalar multiplication of a matrix involves multiplying every element in the matrix by the scalar.
  • 4Matrix multiplication AB is only defined if the number of columns in A equals the number of rows in B.
  • 5If A is an m x n matrix and B is an n x p matrix, their product AB will be an m x p matrix.
  • 6Matrix multiplication is NOT commutative; in general, AB ≠ BA.
  • 7The identity matrix, denoted I, acts like the number 1 in multiplication: AI = IA = A (when dimensions allow).

Worked examples

Example 1

Given vectors u = <3, -2> and v = <-1, 5>, find 2u + v.

IFirst, perform the scalar multiplication for 2u: 2u = 2 * <3, -2> = <2*3, 2*(-2)> = <6, -4>.
IINext, perform the vector addition of 2u and v: 2u + v = <6, -4> + <-1, 5>.
IIIAdd the corresponding components: <6 + (-1), -4 + 5> = <5, 1>.

Answer

<5, 1>

Vector operations are performed component-wise.

Example 2

Given matrices A = [[1, 2], [3, 4]] and B = [[-1, 0], [2, -3]], find 3A - 2B.

IFirst, calculate 3A by multiplying each element of A by 3: 3A = 3 * [[1, 2], [3, 4]] = [[3*1, 3*2], [3*3, 3*4]] = [[3, 6], [9, 12]].
IINext, calculate 2B by multiplying each element of B by 2: 2B = 2 * [[-1, 0], [2, -3]] = [[2*(-1), 2*0], [2*2, 2*(-3)]] = [[-2, 0], [4, -6]].
IIIFinally, perform the matrix subtraction 3A - 2B by subtracting corresponding elements: [[3, 6], [9, 12]] - [[-2, 0], [4, -6]] = [[3 - (-2), 6 - 0], [9 - 4, 12 - (-6)]].
IVSimplify the elements: [[3 + 2, 6], [5, 12 + 6]] = [[5, 6], [5, 18]].

Answer

[[5, 6], [5, 18]]

Ensure matrices have the same dimensions for addition/subtraction. Scalar multiplication applies to every element.

Example 3

Given matrices C = [[1, 2], [3, 4]] and D = [[5, 6], [7, 8]], find the product CD.

ICheck dimensions: C is a 2x2 matrix and D is a 2x2 matrix. The number of columns in C (2) equals the number of rows in D (2), so matrix multiplication is possible. The resulting matrix CD will be a 2x2 matrix.
IICalculate the element in row 1, column 1 of CD: (1st row of C) dot (1st column of D) = (1*5) + (2*7) = 5 + 14 = 19.
IIICalculate the element in row 1, column 2 of CD: (1st row of C) dot (2nd column of D) = (1*6) + (2*8) = 6 + 16 = 22.
IVCalculate the element in row 2, column 1 of CD: (2nd row of C) dot (1st column of D) = (3*5) + (4*7) = 15 + 28 = 43.
VCalculate the element in row 2, column 2 of CD: (2nd row of C) dot (2nd column of D) = (3*6) + (4*8) = 18 + 32 = 50.
VIAssemble the resulting matrix CD with these elements: [[19, 22], [43, 50]].

Answer

[[19, 22], [43, 50]]

Matrix multiplication is not commutative, so CD is generally not equal to DC.

Common mistakes

  • ✗Attempting to add or subtract matrices that do not have the same dimensions.
  • ✗Incorrectly performing matrix multiplication by not following the 'row by column' dot product rule.
  • ✗Assuming matrix multiplication is commutative (i.e., thinking AB = BA is always true).
  • ✗Forgetting to multiply *all* elements of a matrix by the scalar during scalar multiplication.
  • ✗Confusing vector notation (< >) with matrix notation ([ ]).

Exam tips

  • ★Always check the dimensions of matrices before attempting any operation, especially multiplication, to ensure it's defined.
  • ★For matrix multiplication, use a systematic approach (e.g., tracing rows and columns with your fingers) to ensure each element is calculated correctly.
  • ★Practice matrix multiplication extensively, as it is often the most complex operation and a common source of errors.
  • ★Clearly show all steps in your calculations, particularly for matrix multiplication, to minimize errors and allow for partial credit.

Ready to practise?

Try a problem on this topic

Snap a photo or type a question — get step-by-step working instantly.