Chapter 1 Exercises — What Is Linear Algebra?

How to use these. Work the ⭐ problems first to lock in the concepts; they need no computation. The ⭐⭐ problems are quick by-hand calculations (the only arithmetic in this chapter). The ⭐⭐⭐ problems use the visualize_2d tool you built — run them and look. The ⭐⭐⭐⭐ problems are short essays that ask you to find the linear algebra hiding inside a real system. Tags: [hand] = pencil only, [code] = needs numpy/matplotlib, [essay] = written argument. There are no proofs in this chapter; rigor begins in Chapter 2.


Tier ⭐ — Conceptual (what is / why)

1.1 [hand] In one sentence each, state the two rules a transformation must satisfy to be linear. Then state the single combined rule (superposition) that bundles them.

1.2 [hand] The book repeatedly says "a matrix is a function that transforms space." In your own words, explain what the columns of a $2\times 2$ matrix represent geometrically.

1.3 [hand] Why must every linear transformation send the zero vector to the zero vector? Use one of the two rules to justify it.

1.4 [hand] Classify each process as linear or nonlinear, and give a one-line reason: (a) doubling every ingredient in a recipe; (b) the area of a square as a function of its side length; (c) total distance traveled as a function of time at constant speed; (d) the balance of a savings account under annual compound interest; (e) converting a temperature from Celsius to Fahrenheit, $F = \tfrac{9}{5}C + 32$.

1.5 [hand] A friend says, "Linear means a straight-line graph like $y = mx + b$, so $y = 2x + 5$ is a linear transformation." Where are they right, where are they wrong, and what is the correct name for $y = 2x + 5$ as a map?

1.6 [hand] Name the geometric action of each of the following "fundamental" transformations and say what its determinant tells you: identity, scaling, rotation, shear, projection.

1.7 [hand] The chapter claims that knowing where the two basis vectors $\mathbf{e}_1$ and $\mathbf{e}_2$ go tells you where every vector goes. Explain why, citing superposition.

1.8 [hand] Give one application of linear algebra from each of three different fields (not all physics). For each, name the "vector," the "matrix," and what the transformation does.


Tier ⭐⭐ — Light computation (apply a given 2×2 matrix by hand)

1.9 [hand] Let $A = \begin{bmatrix} 3 & 0 \\ 0 & 2 \end{bmatrix}$. Compute $A\mathbf{v}$ for $\mathbf{v} = (1, 1)$, $(2, 0)$, and $(-1, 4)$ by taking the appropriate weighted sum of the columns. Describe in words what $A$ does to space.

1.10 [hand] Let $R = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}$ (the 90° rotation). Compute the images of $(1,0)$, $(0,1)$, and $(1,1)$. Sketch the input and output arrows on graph paper and confirm the whole picture has turned a quarter-turn counterclockwise.

1.11 [hand] Let $S = \begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix}$. Compute $S\mathbf{v}$ for $\mathbf{v} = (1, 0)$ and $(0, 1)$. Which basis vector is unchanged, and which one slides? This is a shear — in which direction?

1.12 [hand] Let $P = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}$. Compute the images of $(5, 3)$, $(-2, 7)$, and $(0, 9)$. What is common to all the outputs, and what does that tell you geometrically? Why can this transformation never be undone?

1.13 [hand] Using superposition only (do not multiply out a matrix), a linear map $T$ satisfies $T(\mathbf{e}_1) = (1, 4)$ and $T(\mathbf{e}_2) = (-2, 0)$. Find $T(3, 2)$ and $T(-1, 5)$.

1.14 [hand] A linear map $T$ has $T(\mathbf{u}) = (2, -1)$ and $T(\mathbf{v}) = (1, 3)$ for some vectors $\mathbf{u}, \mathbf{v}$. Compute $T(\mathbf{u} + \mathbf{v})$, $T(4\mathbf{u})$, and $T(2\mathbf{u} - 3\mathbf{v})$ without knowing what $\mathbf{u}$ and $\mathbf{v}$ are.

1.15 [hand] For each matrix, compute the determinant as $ad - bc$ and state in words what it says about area scaling and orientation: (a) $\begin{bmatrix} 2 & 0 \\ 0 & 5 \end{bmatrix}$; (b) $\begin{bmatrix} 1 & 3 \\ 0 & 1 \end{bmatrix}$; (c) $\begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}$; (d) $\begin{bmatrix} 1 & 2 \\ 2 & 4 \end{bmatrix}$.

1.16 [hand] Show, with the specific vectors $\mathbf{u} = (1, 0)$ and $\mathbf{v} = (0, 1)$, that the map $f(\mathbf{x}) = \mathbf{x} + (3, 1)$ is not linear, by checking whether $f(\mathbf{u} + \mathbf{v}) = f(\mathbf{u}) + f(\mathbf{v})$.


Tier ⭐⭐⭐ — Coding (use the visualizer; classify transformations)

For these, use the visualize_2d function you built in the "Build Your Toolkit" callout. Import it with from toolkit.visualizer import visualize_2d.

1.17 [code] Run visualize_2d on each of these matrices, one per panel, and write a one-sentence description of what each does to the unit square: $\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}$, $\begin{bmatrix} 0.5 & 0 \\ 0 & 0.5 \end{bmatrix}$, $\begin{bmatrix} -1 & 0 \\ 0 & 1 \end{bmatrix}$, $\begin{bmatrix} 1 & 0 \\ 1 & 1 \end{bmatrix}$.

1.18 [code] Using the formula $R_\theta = \begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix}$, build the rotation matrices for $\theta = 30°, 45°, 90°, 180°$ in numpy (remember np.radians) and visualize each. Confirm by eye that the square turns by the right angle, and print each determinant — what value do you get every time, and why?

1.19 [code] Visualize the projection $\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}$ and, separately, the matrix $\begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix}$. Describe the difference. Both have determinant 0 — explain what that zero means geometrically in each case.

1.20 [code] For each matrix below, first predict its determinant by hand, then read the value off the visualizer's title to check yourself: (a) $\begin{bmatrix} 3 & 0 \\ 0 & 3 \end{bmatrix}$; (b) $\begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}$; (c) $\begin{bmatrix} 1 & 2 \\ 2 & 4 \end{bmatrix}$. For (c), what does the picture do that the others don't, and how does the determinant warn you?

1.21 [code] Classification challenge. Write a short script that, for each of the following matrices, visualizes it and prints det. Then classify each as one of {pure scaling, pure rotation, shear, projection, reflection, general}: $\begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix}$, $\begin{bmatrix} 4 & 0 \\ 0 & 1 \end{bmatrix}$, $\begin{bmatrix} 1 & -1 \\ 0 & 1 \end{bmatrix}$, $\begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix}$, $\begin{bmatrix} 2 & 1 \\ 1 & 3 \end{bmatrix}$.

1.22 [code] Verify superposition numerically. Pick any $2\times 2$ matrix A, any two vectors u, v, and any two scalars c, d. In numpy, compute A @ (c*u + d*v) and c*(A@u) + d*(A@v) and confirm they are equal (use np.allclose). Try it with three different choices of A to convince yourself it always holds.


Tier ⭐⭐⭐⭐ — Application / short essay (find the linear algebra)

1.23 [essay] The recommender. A music app represents each listener and each song as a vector of 50 numbers ("taste coordinates"), and predicts how much you'll like a song from how well your vector aligns with the song's vector. In 150–250 words, identify (a) what the vectors are, (b) what operation produces a predicted rating, and (c) where a matrix and a transformation enter the picture. Which later chapter (by number) does the book promise will make this precise?

1.24 [essay] One game frame. A video game must draw a spinning, approaching asteroid 60 times per second. The asteroid is a cloud of 5,000 vertices. In 150–250 words, explain why this is "linear algebra at scale": what is the vector, what does each matrix do (name at least rotation and scaling), and why is a graphics card the right hardware for the job? Connect the rotation to Figure 1.3.

1.25 [essay] The qubit. Read the chapter's description of a quantum bit. In 150–250 words, explain in what sense a qubit's state is a vector and a quantum logic gate is a matrix, and explain the link between the "superposition" of Section 1.2 and the quantum superposition that lets a qubit be a blend of 0 and 1. Which three later chapters (by number) develop the quantum thread?

1.26 [essay] Spot the nonlinearity. Neural networks are "mostly linear algebra," yet the chapter insists the nonlinear squashing functions between layers are essential. In 100–200 words, explain what would go wrong if you removed all the nonlinearities — why would a deep stack of purely linear layers be no more powerful than a single layer? (Hint: a composition of linear maps is itself a linear map — the book proves this in Chapter 8.)

1.27 [essay] Your own example. Find one system in your own life or studies — a budget, a workout plan, a chemistry calculation, a piece of music software — and argue in 100–200 words whether the core relationship in it is linear or nonlinear, applying the two-question test from Section 1.3.