Vectors in R^n and the Standard Basis

Part 1, Chapter 1: Linear Algebra Toolkit

Learning objectives

  • Define Rn\mathbb{R}^n as the set of ordered n-tuples and perform component-wise addition and scalar multiplication
  • Form linear combinations and compute the span of a set of vectors
  • Distinguish linear independence from linear dependence and recognise the standard basis
  • Predict when a set of vectors must be dependent purely from a count of dimensions

Every linear-algebra problem you will ever encounter lives inside mathbbRn\mathbb{R}^n, or a structure built to behave like it. Whether you are training a 768-dimensional language-model embedding, rotating a triangle in a game engine, or fitting a regression line to housing data, you are working inside an ordered tuple of real numbers, equipped with two operations: add two tuples component-wise, scale a tuple by a real number. Almost nothing else is required. The whole apparatus of vectors, span, independence, and basis, the entire subject of this chapter, is built on those two operations and nothing more.

What a vector actually is

The space mathbbRn\mathbb{R}^n is the set of all ordered nn-tuples mathbfv=(x1,x2,ldots,xn)\mathbf{v} = (x_1, x_2, \ldots, x_n)n) with each xiinmathbbRx_i \in \mathbb{R}iinmathbbR. Two operations are built in: addition, defined as mathbfu+mathbfv=(u1+v1,ldots,un+vn)\mathbf{u} + \mathbf{v} = (u_1 + v_1, \ldots, u_n + v_n)n+vn), and scalar multiplication, cmathbfv=(cx1,ldots,cxn)c \mathbf{v} = (c x_1, \ldots, c x_n)n). These obey eight axioms (associativity, commutativity, distributivity, etc.) that together make mathbbRn\mathbb{R}^n a vector space. A vector has no preferred starting point, what matters is its components, which encode magnitude and direction simultaneously.

Linear combinations and span

A linear combination of vectors mathbfv1,ldots,mathbfvk\mathbf{v}_1, \ldots, \mathbf{v}_kk is any expression of the form c1mathbfv1+c2mathbfv2+cdots+ckmathbfvkc_1 \mathbf{v}_1 + c_2 \mathbf{v}_2 + \cdots + c_k \mathbf{v}_kkmathbfvk with ciinmathbbRc_i \in \mathbb{R}iinmathbbR. The set of all such combinations is the span, written operatornamespan(mathbfv1,ldots,mathbfvk)\operatorname{span}(\mathbf{v}_1, \ldots, \mathbf{v}_k)k). Geometrically, the span of one non-zero vector is a line through the origin; the span of two non-parallel vectors in mathbbR3\mathbb{R}^3 is a plane; in general, the span is the smallest subspace containing the given vectors.

Independence and the standard basis

Vectors mathbfv1,ldots,mathbfvk\mathbf{v}_1, \ldots, \mathbf{v}_kk are linearly independent when the only solution to c1mathbfv1+cdots+ckmathbfvk=mathbf0c_1 \mathbf{v}_1 + \cdots + c_k \mathbf{v}_k = \mathbf{0}kmathbfvk=mathbf0 is c1=cdots=ck=0c_1 = \cdots = c_k = 0k=0. If a non-trivial solution exists, the vectors are dependent, meaning at least one is a linear combination of the others, it carries no new information. The standard basis of mathbbRn\mathbb{R}^n consists of the unit vectors mathbfe1=(1,0,ldots,0),mathbfe2=(0,1,0,ldots,0),ldots,mathbfe_n=(0,ldots,0,1)\mathbf{e}_1 = (1, 0, \ldots, 0), \mathbf{e}_2 = (0, 1, 0, \ldots, 0), \ldots, \mathbf{e}_n = (0, \ldots, 0, 1)n=(0,ldots,0,1), the cleanest possible independent spanning set.

The matrix-multiplier above shows how a 2times22 \times 2 matrix maps the standard basis vectors mathbfe1,mathbfe2\mathbf{e}_1, \mathbf{e}_2 to new vectors that become the columns of the matrix. The image of the unit square is a parallelogram spanned by those two image vectors, an immediate geometric picture of span and independence in mathbbR2\mathbb{R}^2. Try setting both columns equal: the parallelogram collapses to a line, telling you the columns are dependent and span only a 1-dimensional subspace.

Where this shows up
  • Machine learning embeddings: A modern transformer encodes each word or image patch as a vector in mathbbR768\mathbb{R}^{768} or higher. Similar concepts cluster together, and operations like analogy ("king − man + woman") are literally vector addition in mathbbRn\mathbb{R}^n.
  • Computer graphics: Every vertex of a 3D model is a point in mathbbR3\mathbb{R}^3 (or mathbbR4\mathbb{R}^4 with homogeneous coordinates). A scene with one million polygons stores millions of mathbbR3\mathbb{R}^3 vectors and operates on them all in parallel on the GPU.
  • Statistics and regression: A data set of mm observations of nn features is naturally a collection of vectors in mathbbRn\mathbb{R}^n. Linear regression finds the best linear combination of the feature vectors that explains the response variable, pure span arithmetic.

Pause and think: If you have n+1n+1 vectors sitting inside mathbbRn\mathbb{R}^n, must at least one of them be a linear combination of the others? Use the geometric picture (a plane in mathbbR2\mathbb{R}^2 can hold at most two independent directions) before reaching for a formal proof.

Try it

  • Before computing, predict whether (3,5)(3, 5) lies in operatornamespan(1,2),(1,1)\operatorname{span}\{(1, 2), (1, 1)\}. Then verify by solving c1+c2=3c_1 + c_2 = 3 and 2c1+c2=52 c_1 + c_2 = 5.
  • Predict: are (1,2)(1, 2) and (2,4)(2, 4) linearly independent? Then verify using the determinant of the 2times22 \times 2 matrix whose columns are these vectors.
  • Express (7,11)(7, 11) as a linear combination of (1,3)(1, 3) and (2,1)(2, 1). Predict the coefficients first by inspection, then solve the system precisely.
  • Use the matrix widget above: set the columns to (2,0)(2, 0) and (1,3)(1, 3). Read off the area of the image parallelogram (it equals the absolute value of the determinant). Predict before you compute.
  • True or false: any three vectors in mathbbR2\mathbb{R}^2 are linearly dependent. Justify in one sentence using the dimension count.

A trap to watch for

Students routinely confuse "independent" with "non-zero" and "spans mathbbRn\mathbb{R}^n" with "has nn vectors". Neither identification holds. The set (1,0),(2,0)\{(1, 0), (2, 0)\} has two non-zero vectors but is dependent (the second is twice the first) and spans only the xx-axis. Conversely, (1,1),(1,1),(1,0)\{(1, 1), (1, -1), (1, 0)\} has three vectors in mathbbR2\mathbb{R}^2 and so must be dependent, you can never have more independent vectors than the dimension of the space. Always check both conditions explicitly: the vectors must span the space and be linearly independent for the count of vectors to equal the dimension.

What you now know

You can compute linear combinations, decide membership in a span, and test independence in mathbbRn\mathbb{R}^n. The next section (§1.3) lifts these ideas one level: linear maps between mathbbRn\mathbb{R}^n and mathbbRm\mathbb{R}^m are completely encoded by matrices, and span / independence translate into the column space and kernel.

Mark section complete →

References

  • Garrity, T. (2002). All the Mathematics You Missed: But Need to Know for Graduate School. Cambridge University Press, ch. 1, §1.2.
  • Strang, G. (2016). Introduction to Linear Algebra (5th ed.). Wellesley-Cambridge Press, ch. 1.
  • Axler, S. (2015). Linear Algebra Done Right (3rd ed.). Springer, ch. 1-2.
  • Lay, D. C. (2015). Linear Algebra and Its Applications (5th ed.). Pearson, ch. 1.
  • Halmos, P. R. (1958). Finite-Dimensional Vector Spaces (2nd ed.). Van Nostrand, ch. 1.

This page is prerendered for SEO and accessibility. The interactive widgets above hydrate on JavaScript load.