MFML Interactive/ Unit 2 · Vector Spaces Checks 0/10
Unit 2 · Covers Session 2 · ZC416 MFML · Prof. Saurabh

Vector Spaces

Lecture 1 was tactical: solve Ax=bA\mathbf{x}=\mathbf{b}. This unit is strategic: we zoom out and map the universe those vectors live in. Six ideas — groups, vector spaces, subspaces, span, independence, basis — and suddenly every ML algorithm is a small geometric story on one board.

≈ 50 min read + play 6 interactive widgets · span in 3D 10 inline checks
1

The universe upgrade

In Unit 1 you played inside the game: rows, pivots, solutions. Now we ask a question one level up: what kind of world makes those moves legal in the first place? The answer is a vector space — and once you know its rules, "add a gradient step," "average two models," "project onto principal components" all become obviously-allowed moves on the same board.

Nearly every object in ML is a vector in some space: a cat photo is a vector in R224×224×3\mathbb{R}^{224\times224\times3} (150,528 numbers), a word inside a language model is a vector in R768\mathbb{R}^{768}, your Netflix taste is a vector in some Rd\mathbb{R}^d, a layer's weights are a vector in Rm×n\mathbb{R}^{m\times n}. Training a model is moving through these spaces in clever ways — and you can't reason about a move without knowing the rules of the board.

Decoder ring: how to read ℝ-with-exponents (worth 60 seconds)
NotationShapeMental picture
R\mathbb{R}a single number (scalar)a dot on the number line
Rn\mathbb{R}^na column of nn numbersa vector / arrow
Rm×n\mathbb{R}^{m\times n}an m×nm\times n grida spreadsheet table
RH×W×3\mathbb{R}^{H\times W\times 3}a stack of 3 gridsan RGB image
RB×H×W×3\mathbb{R}^{B\times H\times W\times 3}BB such stacksa batch of images

Read each R(shape)\mathbb{R}^{\text{(shape)}} as "the set of all real-valued data with this shape." R768\mathbb{R}^{768} is nothing scarier than "a column with 768 numbers in it."

Intuition

The board-game picture — keep it for the whole unit. A vector space is the board ML plays on. Groups supply the addition rules. Vector spaces add scaling. Subspaces are the legal regions. Independence says which moves are redundant. A basis is the minimal toolkit that reaches every square, and dimension is how big the board really is. Six pieces; the rest of MFML is mostly geometry played with them.

2

Groups — the bare skeleton of "combining things"

Before we can say what a vector space is, we need the minimum structure under which "combine two things, get a sensible third thing" works. That's a group: a set GG with an operation \otimes such that four promises hold. Closure: xyx\otimes y stays in GG — you don't fall out of the set. Associativity: (xy)z=x(yz)(x\otimes y)\otimes z = x\otimes(y\otimes z) — grouping doesn't matter. Identity: some do-nothing element ee exists with xe=xx\otimes e = x. Inverse: everything can be undone — each xx has a partner yy with xy=ex\otimes y = e. If order also never matters (xy=yxx\otimes y = y\otimes x), the group is Abelian.

Closure and associativity rarely break. The killers are identity and, above all, inverse — sets fail the moment they're missing the negatives, the fractions, or whatever "undo partner" their elements need. Audit the classics yourself:

The group inspectorfour promises — one broken promise disqualifies

hand at 0

Pause & predict

The counting numbers with zero, (N0,+)(\mathbb{N}_0,+), fail to be a group. Which promise breaks?

Pause & predict

On the 12-hour clock group, what is the inverse of 5?

3

Vector spaces = group + scaling

Take an Abelian group of vectors under addition, and bolt on one more power: scaling by real numbers. A real vector space V=(V,+,)V=(\mathcal{V},+,\cdot) demands: (V1) (V,+)(\mathcal{V},+) is an Abelian group — the zero vector 0\mathbf{0} is its do-nothing element, v-\mathbf{v} its undo. (V2) Distributivity, both ways: λ(x+y)=λx+λy\lambda(\mathbf{x}+\mathbf{y})=\lambda\mathbf{x}+\lambda\mathbf{y} and (λ+ψ)x=λx+ψx(\lambda+\psi)\mathbf{x}=\lambda\mathbf{x}+\psi\mathbf{x}. (V3) Scaling stacks: λ(ψx)=(λψ)x\lambda(\psi\mathbf{x})=(\lambda\psi)\mathbf{x}. (V4) 1x=x1\cdot\mathbf{x}=\mathbf{x}. Translation: a vector space is a place where the two basic moves of linear algebra — add and scale — always make sense and never throw you off the board.

Intuition

The drawing board. Picture an infinite drawing board with one marked point, 0\mathbf{0}. A vector is a movement instruction from the origin. Addition chains movements ("go along u\mathbf{u}, then along v\mathbf{v}"); scaling stretches them ("go 3× as far"). The axioms are simply the guarantee that no matter how you mix these moves, you never fall off the board. That guarantee has a name you met in Unit 1: closure — and it's the reason "add a small gradient to the weights" or "average two models" always yields a valid model of the same shape.

Two examples to hold on to. Lists: Rn\mathbb{R}^n with entrywise addition and scaling — three exam scores (85,92,78)(85,92,78) plus a bonus (5,2,3)(5,-2,3) is (90,90,81)(90,90,81), still three scores. Spreadsheets: Rm×n\mathbb{R}^{m\times n} — whole matrices treated as single vectors, added cell by cell, scaled cell by cell. A weekly-sales sheet plus a corrections sheet is a sheet of the same shape. Same axioms, bigger object.

Watch out

Don't get attached to the word "vector." In linear algebra it does not mean "column of numbers." It means any element of a vector space. A 4×44\times4 matrix is a vector. A polynomial is a vector. A function can be a vector. If it adds and scales without leaving its set, it's a vector — that generality is precisely why one theory covers images, sentences, and weight tensors at once.

Pause & predict

Is a 3×33\times3 weight matrix a "vector"?

4

Subspaces — spaces inside spaces

Imagine this

A flat sheet of glass floats through the corner of your 3-D room, passing through the room's origin. Ants living on the glass experience a complete little 2-D universe: any two of their movements add to a movement on the glass, any scaling stays on the glass. Their world is self-contained — a whole vector space that happens to live inside a bigger one. That's a subspace.

Formally: UVU\subseteq\mathcal{V}, UU\neq\emptyset, is a subspace of VV if UU is itself a vector space under the same operations. The good news: associativity, distributivity and friends are inherited free from VV — they hold for all of V\mathcal{V}, so certainly on UU. Only three things can go wrong, and they're all about staying inside:

The subspace test — 3 checks

(S1) 0U\mathbf{0}\in U — it contains the origin (if not, stop immediately). (S2) closed under adding: u,vUu+vU\mathbf{u},\mathbf{v}\in U \Rightarrow \mathbf{u}+\mathbf{v}\in U. (S3) closed under scaling: uU, λRλuU\mathbf{u}\in U,\ \lambda\in\mathbb{R} \Rightarrow \lambda\mathbf{u}\in Uincluding λ=0\lambda=0 and negative λ\lambda.

Now stress-test four candidate sets with your own hands — the buttons apply real operations to a sample point and check whether the result stays inside:

The subspace stress-testeradd and scale until something escapes
Pick a set, then try to break it.

The one-line rule of thumb

In Rn\mathbb{R}^n, the only subspaces are flat things through the origin: {0}\{\mathbf{0}\} itself, lines through 0\mathbf{0}, planes through 0\mathbf{0}, … up to the whole space. Anything shifted off the origin, curved, or bounded will get caught by scaling or adding — somewhere, some operation escapes the set.

Pause & predict

Which of these is a subspace of R3\mathbb{R}^3?

5

The promised passport: the null space is a subspace

Unit 1 ended with a promise: the blind spot would get its full papers here. Time to deliver. Recall N(A)={xRn:Ax=0}N(A)=\{\mathbf{x}\in\mathbb{R}^n : A\mathbf{x}=\mathbf{0}\} — the directions the machine can't see. Run the three-point test on it:

(S1) A0=0A\mathbf{0}=\mathbf{0}, so 0N(A)\mathbf{0}\in N(A) — the machine maps silence to silence. (S2) if Ax=0A\mathbf{x}=\mathbf{0} and Ay=0A\mathbf{y}=\mathbf{0}, then A(x+y)=0+0=0A(\mathbf{x}+\mathbf{y})=\mathbf{0}+\mathbf{0}=\mathbf{0}. (S3) A(λx)=λAx=λ0=0A(\lambda\mathbf{x})=\lambda A\mathbf{x} = \lambda\mathbf{0}=\mathbf{0}. Three for three — for every matrix AA, no exceptions. The blind spot isn't just a set of unlucky inputs; it is a full flat-through-the-origin world of its own. (Its sibling, the column space — all outputs AxA\mathbf{x} — is a subspace too, by an equally quick argument. Both officially citizens now.)

And this is why the geometry of Unit 1 looked the way it did: the solution set of Ax=bA\mathbf{x}=\mathbf{b} was "a flat thing not through the origin" — precisely because it's a subspace (the null space) shifted by xp\mathbf{x}_p. Subspace + shift = affine flat. The vocabulary was waiting for us one unit ahead.

Pause & predict

Why does N(A)N(A) pass the closure-under-addition test?

6

Span — everywhere you can reach

Imagine this

You're at the origin of a city with a strange transit system: each vector you own is a transport mode — a tram that runs one fixed direction (and backwards, for negative weights, as far as you like). A linear combination λ1x1++λkxk\lambda_1\mathbf{x}_1+\cdots+\lambda_k\mathbf{x}_k is an itinerary. The span is your reachable city: every destination some itinerary can hit. Buy a new tram line that runs along an existing one, and your reachable city doesn't grow by a single block.

Formally, span(x1,,xk)={λ1x1++λkxk:λiR}\operatorname{span}(\mathbf{x}_1,\dots,\mathbf{x}_k)=\{\lambda_1\mathbf{x}_1+\cdots+\lambda_k\mathbf{x}_k : \lambda_i\in\mathbb{R}\} — and it is always a subspace (it contains 0\mathbf{0} via all-zero weights, and sums/scalings of itineraries are itineraries). Fly through what spans look like in 3D:

The span machine — 3Ddrag to orbit · toggle and edit the vectors
vectors in play: 2 dim span = 2

The ink dot is your trip: λ₁v₁ + λ₂v₂ + λ₃v₃, drawn leg by leg. Slide the λ's or roll the dice — no matter what, the trip cannot leave the span surface. That is what span means. And dim span counts reachable directions, not vectors owned: redundant trams don't expand the city — the gap between "owned" and "reached" is exactly what the next section names.

Watch out — span is everywhere in ML

Linear regression's predictions y^=Xw\hat{\mathbf{y}}=X\mathbf{w} live, by definition, in span(columns of X)\operatorname{span}(\text{columns of }X) — the column space you met in Unit 1. PCA compresses by projecting data onto the span of a few top directions. And the famous king − man + woman ≈ queen lives inside the span of four word vectors. "What can this model express?" is usually a question about a span.

Pause & predict

Two collinear vectors in R3\mathbb{R}^3 (one is 34-\tfrac34 times the other). Their span is…

7

Linear independence — the art of non-redundancy

The span machine kept whispering one idea: some vectors add nothing. Here's the formal detector. Ask: can the vectors cancel each other out — combine to 0\mathbf{0}without every weight being zero?

λ1x1+λ2x2++λkxk=0,some λi0 ?\lambda_1\mathbf{x}_1+\lambda_2\mathbf{x}_2+\cdots+\lambda_k\mathbf{x}_k=\mathbf{0},\qquad\text{some }\lambda_i\neq 0\ ?

Yes → linearly dependent. Rearrange that equation and one vector is exposed as a blend of the others — a redundant tram, the "agreeing friend" from Unit 1's group chat. No → linearly independent: the only way to 0\mathbf{0} is the boring all-zeros way, and every vector contributes something the rest collectively can't replicate. There is no third option.

Two instant shortcuts. ① If 0\mathbf{0} is one of your vectors, the set is dependent on the spot — put weight 1 on 0\mathbf{0}, zero elsewhere: a non-trivial combination summing to 0\mathbf{0}. ② For non-zero vectors, "dependent" is exactly "at least one is a combination of the others" — redundancy made literal.

Pause & predict

A set of five vectors happens to include 0\mathbf{0}. What can you conclude?

8

The detector: elimination hunts redundancy

You never have to guess. The foolproof procedure is one you already own: stack the vectors as columns, run Gaussian elimination, read the pivots. Every column with a pivot is a genuine contributor; every pivot-less column is a blend of the pivot columns to its left — and (this is the beautiful part) in reduced row-echelon form, the entries of a non-pivot column literally spell out its recipe.

The redundancy detectorcolumns in → pivots, verdict, recipes out
Your vectors (edit any entry) — columns v₁, v₂, …
Reduced row-echelon form — pivots boxed
rank = dim span =

Highlighted columns on the left are the original pivot columns — keep those and you keep the whole span. The RREF on the right is the X-ray, not the skeleton: it tells you which columns matter and how the others decompose, but the basis you keep is always the original vectors.

Try the presets against the slides: the 2×32\times3 example exposes column 2 as 2×2\times column 1; the three vectors in R4\mathbb{R}^4 come out all-pivots — independent, no redundancy anywhere. Keep the detector in reach; the rest of the unit leans on it twice more.

9

The recipes theorem — independence survives translation

Imagine this

Your pantry holds kk trusted, non-redundant ingredients b1,,bk\mathbf{b}_1,\dots,\mathbf{b}_k (linearly independent). You cook mm new dishes x1,,xm\mathbf{x}_1,\dots,\mathbf{x}_m, each defined purely by its recipe — how much of each ingredient it uses: xj=λ1jb1++λkjbk\mathbf{x}_j=\lambda_{1j}\mathbf{b}_1+\cdots+\lambda_{kj}\mathbf{b}_k. Question: did you accidentally cook the same dish twice under different names? Do you have to taste the dishes — or is reading the recipe cards enough?

Pack the ingredients as columns of B=[b1  bk]B=[\mathbf{b}_1\ \cdots\ \mathbf{b}_k] and each recipe as a column λj\boldsymbol{\lambda}_j; then cooking is a matrix product, xj=Bλj\mathbf{x}_j = B\boldsymbol{\lambda}_j. The theorem:

Aha

{x1,,xm}\{\mathbf{x}_1,\dots,\mathbf{x}_m\} independent     \iff {λ1,,λm}\{\boldsymbol{\lambda}_1,\dots,\boldsymbol{\lambda}_m\} independent.

Reading recipe cards is enough. Why? Test the dishes: ψ1x1++ψmxm=B(ψ1λ1++ψmλm)\psi_1\mathbf{x}_1+\cdots+\psi_m\mathbf{x}_m = B(\psi_1\boldsymbol{\lambda}_1+\cdots+\psi_m\boldsymbol{\lambda}_m). But BB's columns are independent — the only combination of them that gives 0\mathbf{0} is the all-zero one — so Bv=0B\mathbf{v}=\mathbf{0} forces v=0\mathbf{v}=\mathbf{0}. The dish-level question collapses onto the recipe-level question, weight for weight. Geometry in the space mirrors geometry among the recipes — that mirror is the entire reason coordinate systems are useful.

Watch the mirror operate — the two panels are different spaces, yet they always agree:

The mirrordishes on the left, recipe cards on the right — dependence strikes both or neither
DISH SPACE — x = Bλ
RECIPE SPACE — the λ coordinates
−1
1.5

Drag x₂'s recipe until it aligns with x₁'s (recipe (1, 0.5)) — the dishes align at the same moment. And the "+ 3rd dish" button shows the pigeonhole law: recipes live in ℝ² here, and three recipe cards can't be independent in a 2-wide space — so three dishes can't either. More vectors than ingredients (m > k) ⇒ guaranteed redundancy.

The slides run this at full scale: four dishes from four ingredients with recipe matrix columns (1,2,1,1)(1,-2,1,-1), (4,2,0,4)(-4,-2,0,4), (2,3,1,3)(2,3,-1,-3), (17,10,11,1)(17,-10,11,1). Elimination gives RREF pivots in columns 1–3 and a pivot-less column 4 reading (7,15,18)(-7,-15,-18): so λ4=7λ115λ218λ3\boldsymbol{\lambda}_4=-7\boldsymbol{\lambda}_1-15\boldsymbol{\lambda}_2-18\boldsymbol{\lambda}_3, and by the mirror, 7x1+15x2+18x3+x4=07\mathbf{x}_1+15\mathbf{x}_2+18\mathbf{x}_3+\mathbf{x}_4=\mathbf{0} — the four dishes are dependent, redundancy named exactly. (Feed preset 3 of the detector above and read it off yourself.)

Pause & predict

Someone hands you 50 word-embedding vectors that live in a 32-dimensional space. Independent or not?

10

Basis — the just-right toolkit

Imagine this

You're at the origin of a flat city and want to reach every address by chaining straight walks. Knowing only north: you cover one avenue — not enough. North + east: the whole city — a generating set. North + east + north-east: still the whole city, but the third direction is a blend of the first two — generating, yet wasteful. North + east, nothing more: reaches everything, wastes nothing. That is a basis: a linearly independent generating set — the smallest toolkit that still reaches every square.

Four portraits of the same object, all provably equivalent: a basis is ① a generating set that's independent (the textbook line); ② a minimal generating set — remove any vector and some part of the space becomes unreachable; ③ a maximal independent set — add any vector and redundancy appears; ④ a unique address book — every xV\mathbf{x}\in V has exactly one recipe x=iλibi\mathbf{x}=\sum_i\lambda_i\mathbf{b}_i. The fourth is the money view. Why unique? Two recipes for the same x\mathbf{x} would subtract to a non-trivial combination i(λiψi)bi=0\sum_i(\lambda_i-\psi_i)\mathbf{b}_i=\mathbf{0} — forbidden by independence. No redundancy in the toolkit ⟺ no ambiguity in the addresses.

And a basis is thoroughly non-uniqueR3\mathbb{R}^3 is happy with the canonical e1,e2,e3\mathbf{e}_1,\mathbf{e}_2,\mathbf{e}_3, or the staircase (1,0,0),(1,1,0),(1,1,1)(1,0,0),(1,1,0),(1,1,1), or any three independent vectors whatsoever. Same space, different address books:

The address-book remixsame vector v, new basis, new coordinates — never two addresses in one book
2.4
1.8

The gridlines are what "graph paper" looks like to each basis. The broken preset collapses the grid to a line — a dependent pair can't address the plane at all (det = 0; Unit 1 sends its regards).

Watch out — why "change of basis" runs half of ML

PCA is "find a new basis for the data, ordered by variance." The Fourier transform is "re-express the signal in the basis of sines and cosines." Autoencoders learn a basis where structure becomes obvious. The data never changes — the address book does, and in the right book the pattern you're hunting becomes a one-liner. Choosing bases well is much of the art of representation learning.

Pause & predict

Three linearly independent vectors in R4\mathbb{R}^4. Do they form a basis of R4\mathbb{R}^4?

11

Dimension — how big is the board, really?

Here is a small miracle you can lean on forever: pick any basis of a space and count its vectors; pick a completely different basis and count again — you always get the same number. (If a 3-vector basis and a 4-vector basis coexisted, the recipes theorem's pigeonhole would convict the larger one of redundancy — contradiction.) That invariant count is the dimension, dim(V)\dim(V): the number of independent directions the space truly has. So dim(Rn)=n\dim(\mathbb{R}^n)=n, and dim(Rm×n)=mn\dim(\mathbb{R}^{m\times n})=mn — a basis for matrix-space is the family of one-hot matrices EijE_{ij}, one per cell. For subspaces: dim(U)dim(V)\dim(U)\le\dim(V), with equality only when UU is VV.

Watch out — components ≠ dimension

Take V=span ⁣((01))V=\operatorname{span}\!\big(\binom{0}{1}\big). Every vector in it has 2 components, but the space is a line: dim(V)=1\dim(V)=1. Components count the ambient space you're written in; dimension counts the intrinsic space you actually occupy. A road on a 2-D map is a 1-D world ("how far along?"). ML has a name for this gap — intrinsic dimensionality — and a famous bet about it, the manifold hypothesis: real data (faces, speech, text) tends to occupy a low-dimensional surface curled inside its huge ambient space. Representation learning is largely the hunt for that small true dimension.

Pause & predict

V=span ⁣((01))R2V=\operatorname{span}\!\big(\binom{0}{1}\big)\subseteq\mathbb{R}^2. What is dim(V)\dim(V)?

12

Finding a basis — the algorithm

Handed a pile of vectors that span some subspace U=span(x1,,xm)RnU=\operatorname{span}(\mathbf{x}_1,\dots,\mathbf{x}_m)\subseteq\mathbb{R}^n, how do you shrink the pile to a basis? Three steps you can now guess: ① stack them as columns of AA; ② row-reduce to echelon form; ③ keep the original vectors sitting over the pivot columns. Those survivors are independent (pivots certify it), and they span everything the pile spanned (each discarded vector is a recipe of survivors — the RREF column says exactly which recipe). Basis found; count it and you've measured dim(U)\dim(U) too.

Watch out — the classic exam slip

The basis is the original pivot columns of AA, not the tidy columns of the reduced matrix. Row operations scramble what each column looks like while preserving which subsets of columns are independent — so reduction is the X-ray that tells you which bones to keep; the bones themselves come from the original skeleton.

The slide example, finished honestly. Four vectors spanning UR5U\subseteq\mathbb{R}^5:

x1=(12111), x2=(21122), x3=(34353), x4=(18561)\mathbf{x}_1=\begin{pmatrix}1\\2\\-1\\-1\\-1\end{pmatrix},\ \mathbf{x}_2=\begin{pmatrix}2\\-1\\1\\2\\-2\end{pmatrix},\ \mathbf{x}_3=\begin{pmatrix}3\\-4\\3\\5\\-3\end{pmatrix},\ \mathbf{x}_4=\begin{pmatrix}-1\\8\\-5\\-6\\1\end{pmatrix}

Stack, reduce (or press preset 4 in the detector of Section 8 and watch it happen):

rref(A)=(10100120000100000000)\operatorname{rref}(A)=\begin{pmatrix}1&0&-1&0\\0&1&2&0\\0&0&0&1\\0&0&0&0\\0&0&0&0\end{pmatrix}

Pivots in columns 1, 2 and 4. Column 3 is the only freeloader, and its RREF entries (1,2)(-1,2) name the recipe: x3=x1+2x2\mathbf{x}_3=-\mathbf{x}_1+2\mathbf{x}_2 (check it — it works on all five components). So:

The result

A basis of UU is {x1,x2,x4}\{\mathbf{x}_1,\mathbf{x}_2,\mathbf{x}_4\} and dim(U)=3\dim(U)=3: a 3-D flat through the origin of R5\mathbb{R}^5. Four vectors walked in; one was a blend; three genuine directions remain. (Note for companion-PDF readers: the companion's version of this example reports basis {x1,x2}\{\mathbf{x}_1,\mathbf{x}_2\}, dim=2\dim=2, via x4=3x12x2\mathbf{x}_4=3\mathbf{x}_1-2\mathbf{x}_2 — but that combination misses x4\mathbf{x}_4's fourth component (76-7\neq-6). The numbers above are machine-verified; x₄ earns its pivot.)

One more from the slides, in the other direction: the three vectors (1,2,3,4),(2,1,0,2),(1,1,0,4)(1,2,3,4),(2,-1,0,2),(1,1,0,4) in R4\mathbb{R}^4 reduce to all-pivots — independent — yet they are not a basis of R4\mathbb{R}^4: three trams can't cover a four-dimensional city. Independent ≠ basis until the count matches the dimension.

13

The whole story, in six lines

① A group is combining-with-guarantees; add scaling and you get a vector space — the board every ML object lives on. ② A subspace is a flat world through the origin inside a bigger one — null space and column space are the star citizens. ③ The span is everywhere your vectors can reach; it never grows when you add a redundant vector. ④ Independence is non-redundancy, and elimination's pivots detect it mechanically. ⑤ A basis is span + independence: the smallest toolkit reaching everything, giving every vector exactly one address. ⑥ Dimension — the size of any basis — is the board's true size, and it polices everything: more vectors than dimensions ⇒ redundancy, guaranteed.

The one thing to remember

Four questions to run on any vector or matrix you meet in ML: What space does it live in? Is this set independent or redundant? What's the span / column space / null space? Is there a smarter basis? That loop is most of the geometric reasoning behind classical ML — and a surprising amount of deep learning.

Take these home — the companion's five practice problems (with answer keys)

P1. Which are subspaces of R3\mathbb{R}^3? (a) x+y+z=0x+y+z=0 (b) x+y+z=1x+y+z=1 (c) x0x\ge0 (d) x=2yx=2y. Key: (a) and (d) — flat, through the origin. (b) misses 0; (c) dies under λ = −1.

P2. Express b=(4,3,1,2)T\mathbf{b}=(4,3,1,2)^T in terms of v1=(1,1,0,1)T, v2=(0,1,2,2)T, v3=(3,1,0,1)T, v4=(1,1,1,1)T\mathbf{v}_1=(1,-1,0,1)^T,\ \mathbf{v}_2=(0,1,-2,2)^T,\ \mathbf{v}_3=(3,-1,0,1)^T,\ \mathbf{v}_4=(1,1,1,1)^T. Key: row-reduce [v1v2v3v4b][\,\mathbf{v}_1\,\mathbf{v}_2\,\mathbf{v}_3\,\mathbf{v}_4\,|\,\mathbf{b}\,]: unique solution b=157v1+37v2+107v3+137v4\mathbf{b}=-\tfrac{15}{7}\mathbf{v}_1+\tfrac{3}{7}\mathbf{v}_2+\tfrac{10}{7}\mathbf{v}_3+\tfrac{13}{7}\mathbf{v}_4.

P3. b1,b2,b3\mathbf{b}_1,\mathbf{b}_2,\mathbf{b}_3 independent; x1=b1+b2, x2=b2+b3, x3=b1+b3\mathbf{x}_1=\mathbf{b}_1+\mathbf{b}_2,\ \mathbf{x}_2=\mathbf{b}_2+\mathbf{b}_3,\ \mathbf{x}_3=\mathbf{b}_1+\mathbf{b}_3. Independent? Key: check the recipes (1,1,0),(0,1,1),(1,0,1)(1,1,0),(0,1,1),(1,0,1) — three pivots, independent. The mirror does the rest; the bi\mathbf{b}_i never had to be seen.

P4. Is S={(2,3,5),(5,7,9),(1,11,1)}S=\{(2,3,5),(5,7,9),(1,11,1)\} a basis of R3\mathbb{R}^3? Key: row-reduce → 3 pivots, independent; and 3 independent vectors in a 3-D space automatically span it. Yes — both arguments in one breath.

P5. Basis and dimension of span((1,2,1,3),(2,4,2,6),(1,0,1,1),(3,2,3,5))R4\operatorname{span}\big((1,2,1,3),(2,4,2,6),(1,0,1,1),(3,2,3,5)\big)\subseteq\mathbb{R}^4. Key: pivots in columns 1 and 3 — v2=2v1\mathbf{v}_2=2\mathbf{v}_1, v4=v1+2v3\mathbf{v}_4=\mathbf{v}_1+2\mathbf{v}_3. Basis {v1,v3}\{\mathbf{v}_1,\mathbf{v}_3\}, dimension 2. (Preset 5 in the detector.)

Next up

Unit 3 · Analytic Geometry

You can now add and scale — but the board still has no ruler. Unit 3 installs one: norms, inner products, angles, and distances — the tools for asking "how similar are these two data points?", which is half of machine learning. Open Unit 3 →