Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Change of Basis


Linear Algebra·Change of basisSame vector, different numbers. Drag b₁ and b₂ to define a new basis — v stays put in space, but its coordinates (c₁, c₂) shift to express v = c₁·b₁ + c₂·b₂.

03Scenarios

b₁b₂v
v=(2.5, 1.5)
b1=(1, 0)
b2=(0, 1)
Animation
0.00 / 1.00

Standard basis

identity · e₁, e₂

The default coordinate system. b₁ = (1, 0), b₂ = (0, 1). Coordinates in this basis match the standard coordinates of v — they're the same numbers. The change-of-basis matrix is the identity.
Learn more about natural bases · all four categories

01Coordinates of vin two bases

vstd=
2.51.5
vB=
2.51.5
v = 2.5·b₁ + 1.5·b₂

02Change-of-basis matrixcolumns = b₁, b₂

B=
1001
B=
1001
det B = 1 · orthonormal







Key Terms

Basis — A set of two linearly independent vectors in 2D that span the entire plane. Any vector can be written uniquely as a combination of basis vectors.

Change of Basis — The process of re-expressing a vector's coordinates relative to a new basis while the vector itself remains fixed in space.

Basis Matrix B — A 2×22 \times 2 matrix whose columns are the new basis vectors b1b_1 and b2b_2 written in standard coordinates.

Inverse Matrix B⁻¹ — The matrix that converts standard coordinates into coordinates relative to the new basis: vB=B1vstdv_B = B^{-1} v_{std}.

Determinant — A scalar value det(B)\det(B) indicating area scaling and orientation. Zero determinant means the basis is degenerate.

Orthonormal Basis — A basis whose vectors are perpendicular and have unit length. For orthonormal bases, B1=BTB^{-1} = B^T.

Getting Started

The canvas shows three draggable handles, the standard grid in gray, and a dashed basis grid in the colors of b1b_1 (teal) and b2b_2 (purple). The vector vv in amber stays in the same place in space no matter how you reshape the basis.

Try this sequence to build intuition:

• Drag the teal b1b_1 handle to a new direction. The basis grid tilts; the coordinates of vv in the new basis update on the right.
• Drag the purple b2b_2 handle. The parallelogram cells of the basis grid shift accordingly.
• Drag the amber vv handle. Its standard coordinates change, and its decomposition along b1b_1 and b2b_2 updates.

The point: vv is a fixed geometric object. Only its numerical address changes when you switch bases.

Dragging the Basis Vectors

The two basis vector handles control the entire coordinate system.

• Drag b1b_1 — tilts the first axis. The dashed teal lines of the basis grid rotate and stretch.
• Drag b2b_2 — tilts the second axis. The dashed purple lines follow.
• Drag both close to each other — the basis becomes oblique, and the parallelogram cells flatten. Once they line up exactly, the determinant hits zero and a warning appears on the canvas.

The classification line under the basis matrix updates live: orthonormal when both are unit and perpendicular, orthogonal when perpendicular but scaled, oblique otherwise, or singular when collinear. Watch how the inverse matrix B1B^{-1} also changes in real time, or shows dashes when the basis fails.

Moving the Vector v

The amber vv handle moves the vector you are decomposing. Its purpose is to show that the same point in space carries different coordinate addresses in different bases.

• Drag vv — the dashed decomposition legs along b1b_1 and b2b_2 rebuild from origin to the corner and then to the tip of vv.
• Drag vv to a basis grid intersection — the new coordinates become clean integers like (2,1)(2, 1) even when the basis itself is unusual.
• Keep vv fixed and change the basis — standard coordinates stay the same, but new-basis coordinates rearrange.

The decomposition equation under the coordinates reads v=c1b1+c2b2v = c_1 \cdot b_1 + c_2 \cdot b_2 with live values for c1c_1 and c2c_2.

Using the Preset Scenarios

The scenarios panel (03) on the left jumps the basis directly to ten canonical configurations grouped into four categories.

• Natural — standard, rotated 30°, rotated 45°, stretched axes. All have perpendicular b1b_1 and b2b_2.
• Non-orth — skewed, diagonals, obtuse. Valid bases with parallelogram cells.
• Orientation — Y flipped, axes swapped. Both have det(B)=1\det(B) = -1, reversing handedness.
• Degenerate — collinear. det(B)=0\det(B) = 0, coordinates undefined; useful for seeing the failure case.

Each scenario has a short explanation in the explanation card up top. Selecting a preset overwrites the current b1,b2b_1, b_2 but keeps vv in place, so you can compare directly.

Natural Bases: Rotated and Stretched Axes

Four presets keep the axes perpendicular. Two are rotations of the standard basis, one stretches the axes to unequal lengths, and one is the standard basis itself.

The frozen picture is the 30° rotation. The vector mathbfvmathbf{v} has not moved — it sits exactly where it always sat — but the dashed basis grid has turned beneath it, and the decomposition legs now run along the new axes. Its coordinates read (2.915,0.049)(2.915, 0.049) instead of (2.5,1.5)(2.5, 1.5).
b₁b₂v
Rotated 30° basis, frozen

v has not moved - the dashed basis grid has turned beneath it. The decomposition legs run along the new axes, and the coordinates read (2.915, 0.049) instead of (2.5, 1.5).

That is the whole idea the tool exists to convey: a change of basis moves the description, not the vector. The arrow is fixed in the plane; only the numbers used to name it change.

Rotations are the friendliest case because they are orthonormal — perpendicular axes of unit length. For those, the inverse of the basis matrix is simply its transpose, B1=BmathsfTB^{-1} = B^{mathsf{T}}, which is why converting coordinates costs nothing more than a transpose.

The stretched-axes preset breaks the "unit length" half while keeping perpendicularity. One step along mathbfb1mathbf{b_1} then covers two standard units, so the coordinate along it *shrinks* while the other grows — a useful reminder that coordinates are counts of basis steps, not distances.

Non-Orthogonal Bases: Parallelograms Instead of Squares

Three presets drop the right angle. The frozen picture is the skewed basis, mathbfb1=(1,0.4)mathbf{b_1} = (1, 0.4) and mathbfb2=(0.3,1)mathbf{b_2} = (-0.3, 1), where the dashed basis grid is made of parallelograms rather than squares.

The same mathbfvmathbf{v} now reads (2.634,0.446)(2.634, 0.446), and the two decomposition legs meet at an oblique angle.
b₁b₂v
Skewed basis, frozen

The basis grid is made of parallelograms rather than squares, and the two legs meet at an oblique angle. Still a valid basis: det = 1.12, so v has unique coordinates (2.634, 0.446).

Nothing here is invalid. The only requirement for a basis is that the two vectors be linearly independent — equivalently $det B
eq 0$ — and perpendicularity is a convenience, not a condition. Every vector still has exactly one pair of coordinates in this basis.

What is lost is the convenience. Without orthogonality, $B^{-1}
eq B^{mathsf{T}}$ and the inverse must be computed properly; the Pythagorean formula for length no longer applies to the coordinates; and projecting onto one axis is no longer independent of the other. Non-orthogonal bases are common in practice — crystal lattices and eigenbases are rarely perpendicular — which is why the tool insists they are legitimate.

Orientation Reversed: a Negative Determinant

Two presets have detB=1det B = -1: one flips the yy-axis, and one swaps the two axes outright. The frozen picture is the yy-flip, where mathbfb2mathbf{b_2} points down instead of up.

The coordinates come out (2.5,1.5)(2.5, -1.5) — the same numbers as the standard basis, with the second sign reversed.
b₁b₂v
Y-flipped basis, frozen

b2 points downward, so det = -1 and the basis is left-handed. The coordinates are (2.5, -1.5) - the standard numbers with the second sign reversed.

These bases are perfectly valid — a negative determinant is still a non-zero one — but they are left-handed. Rotating mathbfb1mathbf{b_1} to mathbfb2mathbf{b_2} now turns clockwise rather than counterclockwise, and the sign of the determinant is exactly what records that.

The magnitude and the sign of detBdet B say different things. Its absolute value is the area of the parallelogram the basis spans, so it measures how much a coordinate step covers; its sign records handedness. Both matter, and the tool's readout shows the signed value rather than the area alone.

Degenerate: When the Pair Is Not a Basis

One preset is deliberately broken: mathbfb1=(1,0)mathbf{b_1} = (1, 0) and mathbfb2=(2,0)mathbf{b_2} = (2, 0) are collinear, so detB=0det B = 0.

The frozen picture shows the failure directly. The basis grid collapses — every "cell" flattens onto the xx-axis — and no decomposition legs are drawn, because mathbfvmathbf{v} has no coordinates in this pair at all.
b₁b₂v
Collinear pair, frozen

b1 and b2 lie on the same line, so det = 0. The basis grid has collapsed onto the x-axis and no decomposition legs are drawn - v simply has no coordinates in this pair.

Two vectors on one line cannot reach anything off that line, so most of the plane is unreachable; and any point *on* the line can be written in infinitely many ways, since mathbfb2=2mathbfb1mathbf{b_2} = 2mathbf{b_1} lets you trade one for the other freely. Existence fails for most vectors, uniqueness fails for the rest — and a basis needs both.

That is why $det B
eq 0isthepreconditionforeverythingelseonthispage.Thechangeofbasisformularequires is the precondition for everything else on this page. The change-of-basis formula requires B^{-1},andasingular, and a singular B$ has no inverse. Including one broken case is what makes the other nine legible: it shows what the condition is actually protecting against.

Reading the Coordinates Card

The coordinates card (01) shows two column vectors stacked side by side.

• vstdv_{std} — coordinates in the standard basis, the raw (x,y)(x, y) position. These never change when you only change the basis.
• vBv_B — coordinates in the current basis BB. Numbers shift whenever you drag b1b_1 or b2b_2.
• Decomposition line — the explicit linear combination v=c1b1+c2b2v = c_1 \cdot b_1 + c_2 \cdot b_2, color-matched to each basis vector.

When the basis is singular, the new-basis cells show dashes and a red warning strip explains that b1b_1 and b2b_2 are linearly dependent. This is the visual cue that coordinates do not exist for this basis.

The Basis Matrix and Its Inverse

Card 02 shows the change-of-basis matrix BB and its inverse B1B^{-1}, both updating live.

• BB — the new basis vectors as columns. Teal entries are the components of b1b_1, purple are b2b_2.
• B1B^{-1} — multiplies standard coordinates to give new-basis coordinates: vB=B1vstdv_B = B^{-1} v_{std}.
• det(B)\det(B) — printed below with classification: orthonormal, orthogonal, oblique, or singular. A negative determinant means orientation reverses.

Try the rotated 30° preset: B1B^{-1} becomes the transpose BTB^T, the textbook property of orthonormal matrices. Try the stretched-axes preset: BB is diagonal and so is B1B^{-1}, with reciprocal entries.

Display Layer Toggles

The layer chips toggle which visual elements appear on the canvas.

• std grid — gray standard xyxy grid. Turn off to see the basis grid in isolation.
• basis grid — dashed parallelogram cells in the colors of b1b_1 and b2b_2. This is the coordinate system implied by your new basis.
• decomposition — dashed legs from origin to the parallelogram corner to the tip of vv. Shows the explicit c1b1+c2b2c_1 b_1 + c_2 b_2 path.
• labels — the b1b_1, b2b_2, and vv name tags on each vector tip.

A useful combination: hide std grid and show only basis grid — the new basis becomes the natural coordinate system, with vv landing on whole-number intersections.

What Is a Change of Basis?

A vector is a geometric object that exists independently of any coordinate system. When you describe it with numbers, those numbers depend on which basis you choose as a reference frame.

The standard basis {e1,e2}\{e_1, e_2\} with e1=(1,0)e_1 = (1, 0) and e2=(0,1)e_2 = (0, 1) gives the familiar (x,y)(x, y) coordinates. Any other pair of linearly independent vectors {b1,b2}\{b_1, b_2\} forms a valid basis. The same vector vv then has two numerical addresses: vstdv_{std} in the standard basis and vBv_B in the new basis.

A change of basis is the rule that converts between these addresses. The vector itself does not move — only its description changes.

For deeper coverage, see linear independence, vector spaces, and basis of a vector space.

The Change-of-Basis Formula

The change-of-basis matrix BB has the new basis vectors as columns:

B=[b1b2]=[b1xb2xb1yb2y]B = \begin{bmatrix} b_1 & b_2 \end{bmatrix} = \begin{bmatrix} b_{1x} & b_{2x} \\ b_{1y} & b_{2y} \end{bmatrix}


Converting new-basis coordinates back to standard coordinates uses multiplication by BB:

vstd=BvBv_{std} = B \, v_B


Going the other direction requires the inverse:

vB=B1vstdv_B = B^{-1} \, v_{std}


For an orthonormal basis (perpendicular unit vectors), the inverse equals the transpose: B1=BTB^{-1} = B^T. This is why rotations are so efficient computationally.

The basis is valid as long as det(B)0\det(B) \neq 0. If the determinant is zero, b1b_1 and b2b_2 are linearly dependent and fail to span the plane.

For a full treatment see matrix inverse, determinant, and matrix multiplication.