Change of Basis Matrix Calculator

Convert coordinate columns from an ordered basis B to an ordered basis C. The calculator finds both directions, checks the basis matrices, and can transform an optional vector—entirely in your browser.

Enter Two Ordered Bases

Each basis vector is a column. The relative tolerance controls when a numerical pivot is treated as zero.

Old basis B (source coordinates)

Paste basis B

New basis C (destination coordinates)

Paste basis C

Optional vector coordinates [v]B

Leave every entry blank to calculate only the change of basis matrices, or fill every entry to convert a vector from B-coordinates to C-coordinates.

Change of Basis Results

Enter two valid ordered bases to calculate the coordinate conversion matrices.
det(B)
det(C)
max |C·PC←B − B|
max |PC←BPB←C − I|
Optional vector conversion results will appear here.
Numerical checks appear after a successful calculation.

Advertisement

Calculation Steps

Calculate two bases to see the formulas with your matrices.

Change of Basis Formula and Convention

Basis matrices

B = [b₁ … bₙ], C = [c₁ … cₙ]

The ordered basis vectors are columns written in the same ambient coordinate system, usually standard coordinates.

B-coordinates to C-coordinates

[v]ᴄ = C⁻¹B[v]ᴮ

Therefore the displayed forward change of basis matrix is Pᴄ←ᴮ = C⁻¹B.

C-coordinates to B-coordinates

[v]ᴮ = B⁻¹C[v]ᴄ

The reverse matrix is Pᴮ←ᴄ = B⁻¹C, the inverse of the forward matrix.

Convention: Arrows show the direction of coordinate conversion: destination ← source. Some textbooks name a change of basis matrix in the opposite verbal order, so use the displayed formula rather than relying only on a name.
Numerical method: The calculator uses scaled partial pivoting and JavaScript double-precision arithmetic. It accepts zero or finite nonzero entries from 10⁻⁴⁰ through 10⁴⁰ in magnitude. Display precision does not round intermediate values.

How to Use the Calculator

  1. Choose the dimension of the vector space.
  2. Enter the old ordered basis B and new ordered basis C. Put one basis vector in each column, with components down the rows.
  3. Optionally enter all coordinates of a vector relative to B.
  4. Select Calculate change of basis. Read PC←B for the forward conversion and PB←C for the reverse conversion.
  5. Use the residuals to check the floating-point calculation, then copy or download the result if needed.

Worked 2D Example

The default example uses B = [(1,1), (1,−1)], C = [(1,1), (0,2)], and [v]B = (3,−1). The basis vectors are columns, so:

Forward matrix

Pᴄ←ᴮ = [[1, 1], [0, −1]]

This converts the vector to [v]C = (2,1).

Standard-coordinate check

B(3,−1) = (2,4) = C(2,1)

Both coordinate columns describe the same vector in the ambient coordinate system.

Ordered Bases, Invertibility, and Numerical Limits

A coordinate column records the coefficients of a vector relative to an ordered basis. Because order determines which coefficient multiplies which basis vector, swapping two columns changes the conversion matrix. Both entered matrices must be square and nonsingular: if their columns are dependent, at least one vector has no unique coordinate column.

The calculator verifies CPC←B ≈ B and that the two conversion matrices multiply to the identity. Small nonzero residuals are normal in floating-point arithmetic. Large condition estimates mean rounding or small input changes may strongly affect the result.

Change of Basis Matrix FAQs

What is a change of basis matrix?

It converts the coordinate column of the same vector between two ordered bases. The columns of PC←B are the vectors of basis B expressed in basis C.

Why is the formula C⁻¹B rather than B⁻¹C?

Starting from v = B[v]B = C[v]C, multiply by C⁻¹ to get [v]C = C⁻¹B[v]B. The order reverses when converting in the other direction.

Does the order of basis vectors matter?

Yes. Coordinates belong to an ordered basis. Reordering columns changes which coefficient belongs to each basis vector.

What if one entered basis is singular?

Its columns are linearly dependent, so they do not form a basis and unique coordinate conversion is impossible. Check for duplicate, zero, or dependent basis vectors.

Are the forward and reverse matrices inverses?

Yes. (C⁻¹B)⁻¹ = B⁻¹C. The mutual-inverse residual checks this numerically.

Can I enter basis vectors as rows?

No. This calculator follows the common column-vector convention: place each basis vector in one column. If your source lists vectors as rows, transpose that arrangement first.

Are my entries private?

Yes. The page calculates locally and does not transmit or store your basis or vector entries. Copying and downloads are also created in your browser.

Calculation Notes

Last reviewed: August 5, 2026 by the Starlight Tools editorial team.

The coordinate-map definition and column-basis convention were checked against MIT OpenCourseWare’s change of basis materials. Numerical output is appropriate for study and routine calculation; use exact or higher-precision software when a proof or precision-sensitive result is required.

Explore more tools