Exercises: Matrices and Linear Maps

Practice problems and worked solutions for linear maps, basis images, and matrix composition.
Modified

April 26, 2026

Keywords

exercises, matrices, linear maps, composition

1 Scope and Goals

This set trains four things:

  • testing whether a rule is linear
  • building a matrix from basis images
  • interpreting matrix multiplication as composition
  • preparing for eigenvalue and least-squares pages

2 Prerequisites

  • linear combinations
  • basis vectors
  • matrix-vector multiplication

3 Warm-Up Problems

  1. Decide whether \(T(x,y)=(x+y,2y)\) is linear.
  2. Find the matrix of \(T(x,y)=(2x-y,x+y)\) by computing \(T(e_1)\) and \(T(e_2)\).

4 Core Problems

  1. Let

    \[ T(e_1) = \begin{bmatrix} 1 \\ 2 \end{bmatrix}, \qquad T(e_2) = \begin{bmatrix} 3 \\ 0 \end{bmatrix}. \]

    Write the matrix of \(T\).

  2. Let

    \[ A = \begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix}, \qquad B = \begin{bmatrix} 2 & 0 \\ 0 & 1 \end{bmatrix}. \]

    Compute \(AB\) and \(BA\).

  3. If \(T(x)=Ax\) and \(S(x)=Bx\), explain in words why \(T \circ S\) corresponds to \(AB\).

5 Proof Problems

  1. Prove that any linear map sends \(0\) to \(0\).
  2. Prove that if two linear maps agree on a basis, then they agree everywhere.

6 Computational or Applied Problems

  1. Open Computation Lab: Matrix Composition and Basis Action. Change the shear and scale, then compare \(ABx\) with \(BAx\) for the same sample vector.
  2. In software, batch several vectors into a matrix \(X\) and verify that applying the same matrix \(W\) to each vector individually matches the batched product.

7 Hints

  1. For linearity, check both addition and scalar multiplication.
  2. The columns of the matrix are the images of the basis vectors.
  3. Composition order is right-to-left in function language.

8 Full Solutions

8.1 Solution 1

For addition,

\[ T((x_1,y_1)+(x_2,y_2)) = T(x_1+x_2, y_1+y_2) = (x_1+x_2+y_1+y_2,\; 2y_1+2y_2), \]

which equals \(T(x_1,y_1)+T(x_2,y_2)\).

For scaling,

\[ T(c(x,y)) = T(cx,cy) = (cx+cy, 2cy) = c(x+y,2y)=cT(x,y). \]

So the map is linear.

8.2 Solution 2

We have

\[ T(e_1)= \begin{bmatrix} 2 \\ 1 \end{bmatrix}, \qquad T(e_2)= \begin{bmatrix} -1 \\ 1 \end{bmatrix}. \]

So the matrix is

\[ \begin{bmatrix} 2 & -1 \\ 1 & 1 \end{bmatrix}. \]

8.3 Solution 3

The matrix is

\[ \begin{bmatrix} 1 & 3 \\ 2 & 0 \end{bmatrix}. \]

8.4 Solution 4

\[ AB = \begin{bmatrix} 2 & 2 \\ 0 & 1 \end{bmatrix}, \qquad BA = \begin{bmatrix} 2 & 4 \\ 0 & 1 \end{bmatrix}. \]

So the matrices do not commute.

8.5 Solution 5

Applying \(S\) first gives \(Bx\). Applying \(T\) after that gives \(A(Bx)=(AB)x\). The product matrix stores the combined action in coordinates.

9 Common Errors

  • checking only one linearity property
  • writing rows instead of columns when building a matrix from basis images
  • reading \(AB\) as “do \(A\) first”

10 What To Do Next

Open Subspaces, Basis, and Dimension next. Once matrices are treated as maps, the next question is which subspaces those maps create or preserve.

11 Sources and Further Reading

Back to top