Linear Algebra

Linear Transformations

A linear transformation is a function that preserves addition and scaling; in coordinates it becomes a matrix, determined by what it does to a basis.

status: reviewimportance: importantdifficulty 3/5math: undergraduateread: 16mprediction probe

Concept Structure

Linear Transformations

01Intuition

Start with the picture, metaphor, or geometric mechanism.

02Math

Make the objects explicit and connect them with notation.

03Code

Mirror the equations with runnable implementation details.

04Interactive Demo

Commit a prediction against the code witness.

2prerequisites
2next concepts
2related links

Learner Contract

What this page should let you do.

You are here becauseA linear transformation is a function that preserves addition and scaling; in coordinates it becomes a matrix, determined by what it does to a basis.

This Linear Algebra concept is the current object: keep the same invariant visible across Intuition, Math, Code, Interactive Demo.

By the end4/4 sections ready | code witness expected | prediction probe

Explain the mechanism, trace the main notation, and answer the prediction probe against the code witness.

Do this firstIntuition

Read the intuition before the notation; the math should name a mechanism you already felt.

Test the linkUse the prediction probe to commit to the mechanism before moving on.Then continue to Representation Learning & Embedding Geometry

Claim/source review status

Claim review not recorded

No structured claim checks yet; source metadata is not enough to establish support.Metadata-derived; review may be AI-assisted. Not a human certification.
Claims0/0 reviewed
Sources0 cited
Codeattached
Demoplanned
Reviewednot recorded
Updatedpage 2026-06-29

Object flow

4/4 sections readyAsk about thisResearch room
ConceptLinear TransformationsLinear Algebra
Local snapshot ready
concept:linear-algebra/linear-transformations
01

01

Intuition

Build the mental picture first so the rest of the page has something to attach to.

Section prompt

A linear transformation is a “machine for vectors” that respects the two operations that define a vector space:

  • if you add two inputs, the outputs add the same way
  • if you scale an input, the output scales the same way

That sounds restrictive, but it’s exactly what makes linear maps easy: once you know what the machine does to a basis, you know what it does to every vector.

This is the bridge from geometry to matrices: a matrix is just a linear transformation written in coordinates.

In deep learning, learned matrices are everywhere: embedding projections, MLP layers, attention query/key/value maps, and feature-space rotations all use the same idea. The nonlinear parts of a network are important, but the linear maps are the pieces that move information between coordinate systems.

02

02

Math

Translate the story into symbols, assumptions, and a derivation you can inspect.

Section prompt

Definition. A function T:VWT: V \to W is linear if for all u,vVu,v \in V and scalars α\alpha:

T(u+v)=T(u)+T(v),T(αv)=αT(v).T(u+v) = T(u) + T(v), \qquad T(\alpha v) = \alpha T(v).

In Rn\mathbb{R}^n with the standard basis, every linear map has the form

T(x)=AxT(x) = Ax

for some matrix AA.

A key concrete fact: the columns of AA are where the basis vectors go. If eie_i is the iith standard basis vector, then

Aei=columni(A).A e_i = \text{column}_i(A).

Two structural ideas show up everywhere:

  • Composition corresponds to matrix multiplication: (ST)(x)=S(T(x))(S\circ T)(x) = S(T(x)) becomes (BA)x(BA)x.
  • Kernel and image: ker(T)={x:Ax=0}\ker(T)=\{x:Ax=0\} and im(T)={Ax:xV}\operatorname{im}(T)=\{Ax:x\in V\}.

In attention layers, for example, token representations xx are multiplied by learned matrices:

q=WQx,k=WKx,v=WVx.q = W_Qx,\qquad k = W_Kx,\qquad v = W_Vx.

Those are linear transformations into query, key, and value spaces. The dot products happen after the representations have been moved into those learned coordinate systems.

03

03

Code

Keep the implementation aligned with the notation so the algorithm is legible.

Section prompt
import numpy as np

A = np.array([
    [1.2, 0.3],
    [-0.4, 0.8],
])

e1 = np.array([1.0, 0.0])
e2 = np.array([0.0, 1.0])

print("A e1 =", A @ e1)  # column 1
print("A e2 =", A @ e2)  # column 2

x = np.array([2.0, -1.0])
print("T(x) =", A @ x)
print("area scale det(A) =", np.linalg.det(A))
04

04

Interactive Demo

Use the authored prediction probe to test the mechanism without a live widget.

Section prompt

Prediction check: before running the code, read the columns of A and predict A e1 and A e2 without multiplication. Then change the second column to a multiple of the first and predict what happens to determinant-as-area scaling.

After The First Pass

Turn the concept into an inspected object.

Once the invariant is visible in the intuition, math, code, and demo, use these panels to inspect the mechanism visually, check source support, practice the idea, and attach a grounded research question.

Mechanism Storyboard

See the idea move before the page explains it

A linear transformation is a function that preserves addition and scaling; in coordinates it becomes a matrix, determined by what it does to a basis.

Demo notes open01 / Intuition
Prediction lens

Start with the picture, metaphor, or geometric mechanism.

Commit first

Before reading further, choose the kind of change Linear Transformations should make visible.

Visual Inquiry

Make the image answer a mathematical question

A linear transformation is a function that preserves addition and scaling; in coordinates it becomes a matrix, determined by what it does to a basis.

4/4 stages readyDemo notes connected
Prediction

Which visible object should carry the first intuition?

Commit first

Pick the cue that should make Linear Transformations easier to reason about before the page gives the answer.

Source Grounding

Canonical references for the mechanism on this page.

Source gapNo canonical references are listed yet.

Add source metadata before treating this page as source-grounded.

Claim Review

A linear transformation is a function that preserves addition and scaling; in coordinates it becomes a matrix, determined by what it does to a basis.

StatusSubstantive claim review pending

Source IDs and witness objects are attached for review; they are not proof by themselves.

SourcesNo references

Add source metadata before claiming support.

Witnesses3 local objects

Use equation, code, and demo objects to check whether the source support is operational.

Practice Loop

Try the idea before it explains itself

A linear transformation is a function that preserves addition and scaling; in coordinates it becomes a matrix, determined by what it does to a basis.

Readiness0/3 checks ready
Predict

Before touching the demo, predict one visible change that should happen in Linear Transformations.

Hint 1

Reveal when your model needs a nudge.

Hint 2

Reveal when your model needs a nudge.

Hint 3

Reveal when your model needs a nudge.

Object research drawerClose
ConceptLinear TransformationsLinear Algebra
Code witness comparisonLinear Transformations code witness 1A = np.array([Prediction before revealLinear Transformations predictionUse the prediction probe to commit to the mechanism before moving on.
Grounded room questionWhat is the smallest example that makes Linear Transformations click without losing the math?Local snapshot ready

Research Room

Attach the question to an exact object

Pick the concept, equation, source, code witness, claim, misconception, or demo state before asking for help. The handoff stays grounded to that object.
Next local actionNo local draft saved yet

Open the draft below to save one note and next action in this browser.

conceptLinear Algebra

Linear Transformations

Anchored question

What is the smallest example that makes Linear Transformations click without losing the math?

Local action draftNo local draft saved yetExpand only when ready to capture one local next action
Local action draft

This draft stays locally in this browser for concept:linear-algebra/linear-transformations.

No local draft saved.
Evidence to inspect
  • Definition, prerequisite, and contrast concept links
  • The equation or code witness that makes the concept operational
  • One demo state that shows the invariant instead of a slogan
What would resolve this
  • The learner can state the mechanism in their own words
  • The learner can name the prerequisite that would repair confusion
  • The learner can predict how the mechanism changes under one perturbation
Grounded AI handoff

I am working in Continuous Function's research reading room. Object: concept - Linear Transformations Object key: concept:linear-algebra/linear-transformations Context: Linear Algebra Anchor id: concept/concept-notebook/linear-algebra/linear-transformations Open question: What is the smallest example that makes Linear Transformations click without losing the math? Evidence to inspect: - Definition, prerequisite, and contrast concept links - The equation or code witness that makes the concept operational - One demo state that shows the invariant instead of a slogan What would resolve this: - The learner can state the mechanism in their own words - The learner can name the prerequisite that would repair confusion - The learner can predict how the mechanism changes under one perturbation Answer as a careful research tutor: stay source-grounded, separate verified evidence from assumptions, name the relevant math objects, and end with one next action.

Open source object
concept/concept-notebook/linear-algebra/linear-transformations concept:linear-algebra/linear-transformations