skip to content

Why does one vector in R^2 have different coordinates in the standard basis and a rotated basis?

level: middleimportance: nice to knowfreq 32%

answer

  1. the arrow itself does not move
  2. coordinates are weights, not the vector
  3. independent plus spanning defines a basis
  4. independence makes the weights unique
  5. same span, same dimension, different ruler

basics

~20 s

Coordinates are the weights that rebuild a vector from a chosen basis, so they belong to the basis, not to the vector. Rotate the basis and the arrow is unchanged while the list of weights describing it changes.

solid answer

~50 s

A **basis** of a vector space is a set of vectors that is linearly independent and spans the space; its size is the dimension. Coordinates are not intrinsic to a vector - they are the weights that reconstruct it from a specific basis. In R^2 with the standard basis e1 = (1, 0) and e2 = (0, 1), a vector v is written as the pair (v1, v2). Switch to the basis rotated 45 degrees, u1 = (1, 1)/sqrt(2) and u2 = (-1, 1)/sqrt(2), and the same geometric arrow now has coordinates ((v1 + v2)/sqrt(2), (v2 - v1)/sqrt(2)). Nothing about v moved; only the ruler changed. Both bases span the same space and both contain two vectors, because dimension does not depend on which basis you pick. That is why a coordinate pair is meaningless until you say which basis it is relative to.

go deeper

for a junior

Know the two conditions that define a basis - independent and spanning - and that a basis of R^2 always contains exactly two vectors.

for a middle

Explain that coordinates are the unique weights relative to a chosen basis, and be able to re-express a simple vector such as (1, 0) in a rotated basis.

for a senior

Show when a change of basis buys something real - axes aligned with the directions data actually varies in - and when it only relabels the same information.

for a principal

Own the interpretability tradeoff: rotated coordinates can be better behaved numerically yet impossible to explain to stakeholders who reason in the original feature units.

## Span, basis, dimension The **span** of a set of vectors is every weighted combination of them. A set **spans** a space if its span is the whole space. A set is a **basis** when it does two things at once: 1. it spans the space (nothing is missing), and 2. it is linearly independent (nothing is redundant). A basis is therefore a minimal spanning set and also a maximal independent set. Every basis of a given finite-dimensional space has the same number of vectors, and that number is the **dimension**. R^2 has dimension 2, so any basis of it has exactly two vectors: one vector can never span the plane, and any three vectors in the plane must be dependent. ## Coordinates are relative Once a basis {b1, ..., bn} is fixed, every vector v in the space can be written as ``` v = c1*b1 + ... + cn*bn ``` and - crucially - the weights c1, ..., cn are **unique**. Uniqueness is exactly what independence buys: if two different weight lists produced v, subtracting them would give a non-trivial combination equal to zero, contradicting independence. Those unique weights are the **coordinates of v in that basis**. The vector itself is a geometric object - an arrow, a point, a row of measurements. The coordinates are a description of it in a chosen language. Change the language and the description changes even though the object does not. ## The rotated-basis example Take R^2. The standard basis is e1 = (1, 0), e2 = (0, 1), and writing v as (v1, v2) is shorthand for v = v1*e1 + v2*e2. Now rotate by 45 degrees to get ``` u1 = (1, 1)/sqrt(2) u2 = (-1, 1)/sqrt(2) ``` These two are independent and still span R^2, so they are a perfectly valid basis. Because they are orthonormal - mutually perpendicular and of length one - the coordinates of v in this basis are just dot products: ``` a = v . u1 = (v1 + v2)/sqrt(2) b = v . u2 = (v2 - v1)/sqrt(2) ``` Check with v = (1, 0). In the standard basis its coordinates are (1, 0). In the rotated basis they are (1/sqrt(2), -1/sqrt(2)). Two completely different pairs of numbers, one unchanged arrow of length 1 pointing east. Reassuringly the lengths agree: sqrt(1^2 + 0^2) = 1 and sqrt((1/sqrt(2))^2 + (-1/sqrt(2))^2) = 1, because an orthonormal basis preserves lengths computed from coordinates. ## What does not change - **The vector.** It is the same element of the space. - **The dimension.** Every basis of R^2 has two elements. - **The span.** Both {e1, e2} and {u1, u2} span all of R^2. - **Geometric quantities** such as length and angle, provided the new basis is orthonormal. Under a non-orthonormal basis those quantities are still properties of the vector, but you can no longer compute them by naively applying Pythagoras to the coordinates. ## Why anyone bothers changing basis A basis is a choice of axes, and some choices make a problem easier to state. Aligning axes with the directions along which data actually spreads makes each coordinate carry a distinct, comparable piece of information. Aligning axes with directions a transformation merely stretches turns a complicated map into simple per-coordinate scaling. None of this changes the underlying data - it changes the description, which is often the whole point. The cost is interpretability. A coordinate in the original basis may mean 'hours per week'; a coordinate in a rotated basis means a blend of several original features and no longer carries a unit anyone recognises. ## Common confusions to avoid - **A basis need not be orthogonal.** Orthonormality is a convenience, not part of the definition. Any two independent vectors form a basis of R^2. - **Basis vectors are not the coordinates.** The basis is the set of reference directions; the coordinates are the numbers multiplying them. - **More basis vectors does not mean more expressive power.** Adding a third vector to a basis of R^2 makes the set dependent; the span is unchanged and coordinates stop being unique. If you can define a basis by its two conditions, explain why independence forces coordinates to be unique, and re-express a simple vector in a rotated basis, you have the whole idea.

  • Can two different bases of the same space contain different numbers of vectors?
    No. Every basis of a finite-dimensional space has the same number of elements, and that count is the definition of dimension. Any basis of R^2 has exactly two vectors: a single vector cannot span the plane, and any three vectors in the plane are necessarily dependent.
  • What does independence of the basis buy you beyond spanning?
    Uniqueness of coordinates. Spanning alone guarantees every vector can be written as some combination; independence guarantees that combination is the only one. With a dependent spanning set, the same vector has infinitely many coordinate lists, so coordinates stop being a well-defined description.
  • What is the practical advantage of choosing an orthonormal basis?
    Coordinates become plain dot products - the weight on each basis vector is the vector's dot product with it, so no system has to be solved. Lengths and angles computed from coordinates also match the true geometry, so distances read the same in the new coordinates as in the old.

Describing the same street corner in miles east and miles north, or in miles along two diagonal roads. The corner is fixed; the two numbers you quote depend entirely on which roads you measure along.

saying these in an interview costs you the question

  • Says a vector has one true set of coordinates
  • Confuses the basis vectors with the coordinates
  • Thinks every basis must be orthogonal
  • Believes changing basis changes the dimension of the space

context