Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Basis, dimension, and coordinates

~12 min

A basis is a spanning set that is also independent — reachable without waste. Every vector in the space then has exactly one expression as a combination of basis vectors, and that unique list of coefficients is the vector's coordinate vector relative to that basis. The number of vectors in a basis is the space's dimension, and Linear Algebra I proved (or at least used) the fact that makes "the dimension" a well-defined number at all: every basis of the same space has the same size.

A basis is a minimal ingredient list. It can bake every cake in the space, and it never wastes an ingredient nobody needed. The number of ingredients on that list is the dimension: how many independent choices it takes to describe any cake at all. The coordinate vector is the recipe: how much of each ingredient this cake uses. Change the ingredient list, and the same cake gets a different recipe. It's still the same cake either way.

The dimension of a vector space is the number of vectors in any one of its bases — a well-defined number precisely because every basis of the same space turns out to have the same size. Coordinates are a choice, not a property of the vector itself. The same geometric arrow has different coordinate lists in different bases, the same way the same city has different coordinates on different map projections — the underlying object doesn't move, only the numbers used to describe it. This distinction, "the vector" versus "its coordinates in a chosen basis," is the one Linear Algebra I could mostly gloss over by defaulting to the standard basis \{\mathbf e_1,\dots,\mathbf e_n\}; this course leans on it constantly, starting the moment chapter 01 works over a vector space with no obviously "standard" basis at all — a space of polynomials has no default coordinate grid the way \mathbb R^n does.

Theorem

The Basis Theorem

Recalled from Linear Algebra — Vectors, Matrices, and the Geometry of Data · Dimension — first taught there.

🔖

Let V be a vector space with \dim V = n, and let S \subset V be a set of exactly n vectors. Then S is linearly independent if and only if S spans V — and when either holds, S is a basis for V.

Write S = \{v_1, \dots, v_n\}. Two facts about V are already on hand from the definition of dimension: every linearly independent subset of V can be grown, one vector at a time, into a basis of V; and every basis of V has exactly n vectors, since \dim V = n.

Independent \implies spanning. Suppose S is linearly independent but, toward a contradiction, does not span V. Then some w \in V lies outside \operatorname{span}(S). Adjoining w to S keeps the set independent: if c_1v_1 + \cdots + c_nv_n + c_{n+1}w = 0 with c_{n+1} \ne 0, solving for w would express it as a combination of v_1,\dots,v_n, placing w in \operatorname{span}(S) — which was excluded — so c_{n+1} = 0, and then the independence of S forces every remaining c_i = 0 as well. So S \cup \{w\} is an independent set of n+1 vectors. Extend it to a basis of V exactly as in the growing process above; that basis has at least n+1 vectors, contradicting \dim V = n. No such w exists, so S spans V, and an independent spanning set is by definition a basis.

Spanning \implies independent. Suppose S spans V but, toward a contradiction, is linearly dependent. Dependence means some v_k is a linear combination of the other n-1 vectors in S; deleting v_k leaves a set of n-1 vectors whose span is unchanged, since every occurrence of v_k in a combination can be rewritten using the rest. So V is spanned by only n - 1 vectors. A basis can always be extracted from a spanning set by discarding vectors that are combinations of the others already kept, so V would have a basis of at most n-1 vectors — contradicting \dim V = n. No such dependence exists, so S is independent, and again an independent spanning set is a basis.

Sanity check: in \mathbb{R}^2, where n = 2, the two vectors (1,1) and (1,-1) are independent (neither is a scalar multiple of the other), so the theorem guarantees — without any separate spanning check — that they already span all of \mathbb{R}^2.

One point, two honest readings

Drag the point — watch its coordinates change in BOTH panels at once, even though the point itself hasn't moved relative to either grid.

Loading interactive…

Build a basis for the plane x + y - z = 0

Type two vectors that satisfy the constraint AND are independent — the widget checks membership and independence separately.

Loading interactive…

Worked example

Reading a coordinate vector off a non-standard basis

  1. 1

    Find [\mathbf v]_{\mathcal B} for \mathbf v = (4, 3) and \mathcal B = \{(2,1), (1,-1)\} — solve c_1(2,1) + c_2(1,-1) = (4,3). 2c_1 + c_2 = 4, \qquad c_1 - c_2 = 3

    two equations, two unknowns — this is exactly the linear system machinery from a standard Linear Algebra I course

  2. 2

    Add the two equations to eliminate c_2: 3c_1 = 7, so c_1 = \tfrac{7}{3}. Back-substitute into the second equation: c_2 = c_1 - 3 = -\tfrac23.

  3. 3
    \boxed{[\mathbf v]_{\mathcal B} = \begin{pmatrix} 7/3 \\ -2/3\end{pmatrix}}

    Check: \tfrac73(2,1) - \tfrac23(1,-1) = (\tfrac{14}{3}-\tfrac23,\ \tfrac73+\tfrac23) = (4, 3). ✓.

Loading interactive…

Where this shows up: coordinates without a "natural" choice

Chapter 03 defines the dual space and asks what a coordinate really is from the other direction: not "a vector's description in a basis," but "a linear functional evaluated at a vector." The two views turn out to be the same fact seen from opposite sides, and neither makes sense without the ordinary basis-and-coordinates picture reviewed here.

Where this goes next

Numerical linear algebra and machine learning

Every time a neural network's weight matrix gets multiplied by an input vector, that input is implicitly expressed in some basis — almost always the standard one, for convenience, not because it's forced. Choosing a better basis before doing the arithmetic (the entire idea behind PCA, covered in chapter 10 as a corollary of the SVD) is nothing more than picking coordinates that make a computation's structure visible instead of buried in cross-terms.

Quick review

Practice from earlier coursework, pulled in for this topic.

From Linear Algebra — Vectors, Matrices, and the Geometry of Data

The standard basis \{\mathbf e_1,\mathbf e_2,\mathbf e_3\} for \mathbb{R}^3 has \mathbf e_2 = (0,1,0). What makes \{\mathbf e_1,\mathbf e_2,\mathbf e_3\} independent?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Unit length is true here but isn't what independence is about -- a basis doesn't need unit-length vectors at all.

Vector count alone doesn't guarantee independence -- three vectors in \mathbb{R}^3 can easily be dependent (e.g. if one is a sum of the other two).

Perpendicularity (orthogonality) is a bonus property of the standard basis, not the reason it's independent -- plenty of independent bases aren't orthogonal at all.

Why

Because each \mathbf e_i is the only vector in the set with a nonzero entry in position i, no combination of the others can ever reproduce that nonzero entry -- so no \mathbf e_i can be written using the rest, which is exactly independence.

Look at where each e_i has a nonzero entry that all the other vectors have as zero in that same slot.

From Linear Algebra — Vectors, Matrices, and the Geometry of Data

\{(1,0),(0,1),(1,1)\} in \mathbb{R}^2 spans \mathbb{R}^2. Why is it NOT a basis for \mathbb{R}^2?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

The prompt already states it spans \mathbb{R}^2 -- the failure is on the other condition.

All three vectors are valid 2-entry vectors in \mathbb{R}^2; the count of vectors (three) is the issue, not their size.

A basis is never allowed to contain the zero vector -- its absence isn't the problem here.

Why

(1,1) = 1\cdot(1,0) + 1\cdot(0,1), a nontrivial dependence relation, so the set is dependent. A basis for \mathbb{R}^2 needs exactly 2 independent vectors -- three vectors in a 2-dimensional space are always dependent.

Quick review

Practice from earlier coursework, pulled in for this topic.

From Linear Algebra — Vectors, Matrices, and the Geometry of Data

The set \{(1,0,0), (0,1,0)\} spans a subspace of \mathbb{R}^3. What is the dimension of that subspace?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

Both vectors are independent (neither is a multiple of the other), so they form a basis for the subspace they span, and a basis of 2 vectors means dimension 2 -- this subspace is the xy-plane.

Correct answer

Also accepted:

Why

From Linear Algebra — Vectors, Matrices, and the Geometry of Data

Find \dim(\operatorname{span}\{(1,2,1),\ (2,4,2),\ (0,1,1)\}).

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

(2,4,2) = 2\cdot(1,2,1), so it's redundant. (1,2,1) and (0,1,1) are not multiples of each other, so they're independent and form a basis for the span -- dimension 2.

Correct answer

Also accepted:

Why

Check which of the three vectors is a scalar multiple of another before counting how many independent directions remain.

Quick review

Practice from earlier coursework, pulled in for this topic.

From Linear Algebra — Vectors, Matrices, and the Geometry of Data

\mathcal B=\{\mathbf b_1,\mathbf b_2,\mathbf b_3\} with \mathbf b_1=(1,0,0), \mathbf b_2=(1,1,0), \mathbf b_3=(1,1,1). Find c_3 for [\mathbf x]_{\mathcal B} where \mathbf x=(4, 6, 10).

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

Matching the third coordinate of c_1(1,0,0)+c_2(1,1,0)+c_3(1,1,1)=(4,6,10) gives c_3=10 directly, since only \mathbf b_3 has a nonzero third entry.

Correct answer

Also accepted:

Why

Look at which basis vector is the only one with a nonzero third entry.

From Linear Algebra — Vectors, Matrices, and the Geometry of Data

\mathcal B = \{\mathbf b_1, \mathbf b_2\} with \mathbf b_1=(3,1) and \mathbf b_2=(-1,1). Which system correctly sets up [\mathbf x]_{\mathcal B} for \mathbf x=(5,7)?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

This mixes up which scalar multiplies which vector -- c_1 scales all of \mathbf b_1's entries, and c_2 scales all of \mathbf b_2's entries, not just one coordinate each.

The two coordinate equations are swapped relative to \mathbf x's entries -- the first equation should match \mathbf x's first entry, 5.

This puts \mathbf x's entries where the basis vectors' entries belong -- the system comes from matching c_1\mathbf b_1+c_2\mathbf b_2 to \mathbf x, not the reverse.

Why

c_1(3,1)+c_2(-1,1)=(5,7) matches entrywise to 3c_1-c_2=5 (first coordinates) and c_1+c_2=7 (second coordinates).

Match c1b1 + c2b2 to x entry by entry, being careful about which coefficient multiplies which vector's coordinates.

Feeling good about this section?

Take the section quiz

Every answer gets a full explanation at the end.

Graph settings

Calculator

Sign in to save highlights

Insert an equation

  • No matches.