Bring the mental model from Vector Spaces; this page will reuse it instead of restarting from zero.
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.
Concept Structure
Linear Transformations
Start with the picture, metaphor, or geometric mechanism.
Make the objects explicit and connect them with notation.
Mirror the equations with runnable implementation details.
Manipulate the mechanism and watch the idea respond.
Learning map
Linear TransformationsConceptual Bridge
What should feel connected as you move through this page.
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.
The next edge should feel earned: use the demo prediction here before following Representation Learning & Embedding Geometry.
01
Intuition
Build the mental picture first so the rest of the page has something to attach to.
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
Math
Translate the story into symbols, assumptions, and a derivation you can inspect.
Definition. A function is linear if for all and scalars :
In with the standard basis, every linear map has the form
for some matrix .
A key concrete fact: the columns of are where the basis vectors go. If is the th standard basis vector, then
Two structural ideas show up everywhere:
- Composition corresponds to matrix multiplication: becomes .
- Kernel and image: and .
In attention layers, for example, token representations are multiplied by learned matrices:
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
Code
Keep the implementation aligned with the notation so the algorithm is legible.
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
Interactive Demo
Use direct manipulation to connect the explanation to a moving system.
No interactive demo yet. A great demo: drag a matrix (shear/rotate/scale) and watch a grid + basis vectors transform, plus show determinant as area scaling.
No live visualization is registered for this concept yet.
The page still supports explanatory demo notes above; when a viz.tsx exists, it will render here without changing the route.
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.
Start with the picture, metaphor, or geometric mechanism.
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.
Which visible object should carry the first intuition?
Pick the cue that should make Linear Transformations easier to reason about before the page gives the answer.
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.
Source IDs and witness objects are attached for review; they are not proof by themselves.
Add source metadata before claiming support.
Use equation, code, and demo objects to check whether the source support is operational.
Source support candidates
No structured source note is attached yet.
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.
Before touching the demo, predict one visible change that should happen in Linear Transformations.
Reveal when your model needs a nudge.
Reveal when your model needs a nudge.
Reveal when your model needs a nudge.
A concrete answer is on the canvas.
The answer names why the claim should hold.
It touches the page context or a neighboring idea.
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.Open the draft below to save one note and next action in this browser.
Linear Transformations
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
This draft stays locally in this browser for concept:linear-algebra/linear-transformations.
- 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
- 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
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.
concept/concept-notebook/linear-algebra/linear-transformations
concept:linear-algebra/linear-transformations