Linear Algebra · Basis and coordinates

Basis and coordinates

A basis of the plane is a pair of vectors b₁, b₂ that are not on one line, and the coordinates of a vector x in that basis are the numbers c₁, c₂ with x = c₁b₁ + c₂b₂. The same arrow gets different coordinates in different bases: stretch b₁ along itself and the first coordinate shrinks by the same factor, because the coordinates are what the basis measures, not part of the arrow.

Basis and coordinates in this visualization

A basis of the plane is an ordered pair of vectors b1,b2b_1, b_2 that do not lie on one line. Every vector xx can then be written in exactly one way as x=c1b1+c2b2x = c_1b_1 + c_2b_2, and the numbers c1,c2c_1, c_2 are the coordinates of xx in the basis B=(b1,b2)B = (b_1, b_2), written [x]B[x]_B.

The page’s default: the same arrow in the standard basis and in B
x=(14)=2(11)+1(−12)[x]B=(21)\begin{gathered} x = \begin{pmatrix} 1 \\ 4 \end{pmatrix} = 2\begin{pmatrix} 1 \\ 1 \end{pmatrix} + 1\begin{pmatrix} -1 \\ 2 \end{pmatrix} \\[0.6ex] [x]_B = \begin{pmatrix} 2 \\ 1 \end{pmatrix} \end{gathered}

The left picture is the standard grid, with b1b_1 and b2b_2 as ink arrows, the slanted grid they make, and xx in blue. The right picture is the B-coordinate chart, where b1b_1 and b2b_2 are the sides of the unit square and xx sits at its coordinates. Drag b1b_1 or b2b_2 and xx does not move on the left. Only the grid and the numbers change, because coordinates are a reading taken with a ruler, not a property of the arrow.

To read the coordinates, push xx back to each axis of BB along the other basis vector. Moving parallel to b2b_2, it reaches the b1b_1 axis at c1b1c_1b_1. Moving parallel to b1b_1, it reaches the b2b_2 axis at c2b2c_2b_2. These are the two yellow segments, and with the dashed lines from xx they form a parallelogram whose diagonal is xx. Because b1b_1 and b2b_2 are not on one line, each push meets its axis in exactly one point, so the coordinates exist and are unique.

Stretch b1b_1 to k b1k\,b_1 with k≠0k \ne 0, and keep b2b_2. Since x=(c1/k)(k b1)+c2b2x = (c_1/k)(k\,b_1) + c_2b_2, the first coordinate becomes c1/kc_1/k and the second stays the same: a ruler twice as long gives half the reading. Turning a basis vector follows no such rule, and both coordinates can change.

Put b1b_1 and b2b_2 side by side as the columns of a matrix PP. Then x=c1b1+c2b2x = c_1b_1 + c_2b_2 says x=P [x]Bx = P\,[x]_B: PP turns coordinates in BB into standard ones, and going the other way needs P−1P^{-1}.

Changing coordinates between B and the standard basis E
P=([b1]E    [b2]E)[x]E=P [x]B,[x]B=P−1[x]E\begin{gathered} P = \big( [b_1]_E \;\; [b_2]_E \big) \\[0.6ex] [x]_E = P\,[x]_B, \quad [x]_B = P^{-1}[x]_E \end{gathered}

The B-coordinate chart is the whole plane moved by P−1P^{-1}. It sends b1b_1 and b2b_2 to (1,0)(1, 0) and (0,1)(0, 1), so the grid of BB is square there and our standard grid can become slanted. The standard basis vectors ı^\hat\imath and ȷ^\hat\jmath land on the columns of P−1P^{-1}. The chart is drawn in B-coordinates. It keeps all lengths and angles only when b1b_1 and b2b_2 are perpendicular unit vectors.

A tempting shortcut is to drop perpendiculars from xx to the lines of b1b_1 and b2b_2, and read where they land. Perpendicular feet draws this reading. It gives the coordinates when b1⊥b2b_1 \perp b_2, and for perpendicular unit vectors each reading is simply the dot product x⋅bix\cdot b_i. In a slanted basis it is wrong for every xx except 0.

The feet’s reading, and when it is the coordinate
fi=x⋅bi∣bi∣2b1⊥b2  ⟹  ci=fi\begin{gathered} f_i = \frac{x \cdot b_i}{|b_i|^2} \\[0.6ex] b_1 \perp b_2 \;\Longrightarrow\; c_i = f_i \end{gathered}

Two vectors on one line are not a basis. Then det⁡P=0\det P = 0 and the grid collapses onto that line, or onto O if both vectors are zero. If xx lies in the collapsed grid, it has endless readings: with b2=2b1=(2,2)b_2 = 2b_1 = (2, 2) and x=(3,3)x = (3, 3), every (c1,c2)(c_1, c_2) with c1+2c2=3c_1 + 2c_2 = 3 works. If xx lies outside it, it has none.

Things to notice

  • Dragging b1b_1 or b2b_2 does not transform xx. On the linear transformation page the vector moves with the grid. Here only the ruler changes.
  • The yellow numbers are coordinates in BB, written next to the basis vector they count, as in 2b12b_1. The standard coordinates are on the edge scales of the left picture.

Controls

  • Drag xx in the chart to set its coordinates directly. Moving the pointer over one picture marks the same point in the other with a small cyan ring.

Related