Chapter 2 Formula Sheet
Pure reference. Every entry links back to the page that derives it, and the when you use it column is the reason the entry is here at all — a formula you cannot place is a formula you will not reach for.
Symbols follow Notation and Symbols: lowercase italic scalars, lowercase bold vectors, uppercase bold matrices, calligraphic sets.
Systems of linear equations — §2.1
Section titled “Systems of linear equations — §2.1”| result | statement | when you use it |
|---|---|---|
| general form | writing a problem down before doing anything | |
| matrix form | everywhere | |
| columns form | reframing solvability as reachability — the most useful identity in the chapter | |
| three outcomes | none, exactly one, or infinitely many — never two | classifying a system before solving it |
| why not two | whenever both are solutions | proving the trichotomy in one line |
| geometry | each equation is a hyperplane; the solution set is their intersection | building intuition in 2-D and 3-D |
Matrices — §2.2
Section titled “Matrices — §2.2”| result | statement | when you use it |
|---|---|---|
| matrix | , entry in row , column | always row index first |
| addition | , same shape required | element-wise, unlike multiplication |
| multiplication | , inner dims must match | composition of two linear maps |
| shape rule | catching a bug before running anything | |
| Hadamard product | — a different operation | it is what A * B computes in NumPy |
| columns are images | -th column of is | the idea that makes multiplication obvious |
| associativity | reordering a product chain to cut cost | |
| distributivity | expanding a derivation | |
| identity | , and | note the two different sizes for non-square |
| non-commutativity | ; shapes can even differ | never reorder a product |
| inverse | , square only, unique when it exists | undoing a bijective map |
| inverse | hand calculation; the denominator is the determinant | |
| transpose | reshaping to make dimensions agree | |
| symmetric | , square only | covariance matrices, Gram matrices, Hessians |
The identities, and the two traps
Section titled “The identities, and the two traps”Solving systems — §2.3
Section titled “Solving systems — §2.3”| result | statement | when you use it |
|---|---|---|
| elementary transformations | exchange two rows; multiply a row by ; add one row to another | each is reversible, so the solution set never changes |
| augmented matrix | avoiding rewriting variable names every step | |
| row-echelon form | zero rows at the bottom; each pivot strictly right of the one above | reading off rank, consistency, free variables |
| reduced row-echelon form | additionally every pivot is and alone in its column | reading the solution straight off |
| basic / free variables | pivot columns give basic; the rest are free | counting the solution set’s dimension |
| free variable count | predicting the answer’s shape before solving | |
| general solution | the shape of every solution set in the book | |
| why it works | one line, and it explains the whole decomposition | |
| minus-1 trick | extend the RREF so the diagonal holds only and ; the columns are a null-space basis | reading a kernel basis without further elimination |
| inversion | it is systems at once, which is why inv costs more than solve | |
| pseudo-inverse | do not compute it this way — it squares the condition number | |
| cost | Gaussian elimination is | why direct methods stop at thousands, not millions |
| large systems | stationary iterative (Jacobi, Gauss–Seidel) or Krylov (conjugate gradients) | huge sparse problems; needs a norm, hence §3.1 |
Vector spaces — §2.4
Section titled “Vector spaces — §2.4”Group — four axioms:
Abelian adds . General linear group : the invertible matrices under multiplication — a group, and not Abelian.
Vector space with and :
| result | statement | when you use it |
|---|---|---|
| no vector product | is undefined | only and exist |
| subspace test | with ; closed under scaling; closed under addition | all three, every time |
| trivial subspaces | itself and | edge cases in proofs |
| homogeneous solutions | is a subspace | it is the kernel |
| inhomogeneous solutions | , , is not | it is an affine subspace (§2.8) |
| intersections | the intersection of arbitrarily many subspaces is a subspace | building subspaces from constraints |
| converse | every subspace of is the solution space of some | subspaces and homogeneous systems are the same objects |
| bounded sets | a bounded set is never a subspace unless it is | distinguishing subspaces from convex sets (§7.3) |
Linear independence — §2.5
Section titled “Linear independence — §2.5”| shortcut | statement | when you use it |
|---|---|---|
| no third option | every set is dependent or independent | — |
| zero vector | any set containing is dependent | the cheapest test; do it first |
| duplicates | two identical vectors force dependence | second cheapest |
| multiples | for any forces dependence | sign of is irrelevant |
| the characterisation | nonzero vectors with are dependent iff one is a combination of the others | the conceptual statement |
| counting bound | vectors in with are dependent | no arithmetic needed |
| pivot-column test | write as columns, reduce; independent iff every column is a pivot column | the reliable method |
| ordering caveat | which vectors survive depends on the order offered; the count does not | comparing two people’s answers |
| coefficient shortcut | if with ‘s columns independent, then independent iff is | testing combinations of combinations cheaply |
Basis and rank — §2.6
Section titled “Basis and rank — §2.6”| result | statement | when you use it |
|---|---|---|
| span | the set of all linear combinations; always a subspace | manufacturing a subspace |
| generating set | spans all of | necessary but not sufficient for a basis |
| basis | a linearly independent generating set | the four characterisations below |
| dimension | the common size of every basis, | it is well defined precisely because the size is invariant |
| subspace dimension | , with equality iff | no same-dimension proper subspaces |
| dimension caveat | it counts directions, not components | a line in is one-dimensional |
| basis of a subspace | spanning vectors as columns → row-echelon form → keep the pivot columns | extracting a basis from a spanning set |
| dimension formula | predicting an intersection’s size before computing it |
Four equivalent characterisations of a basis :
Rank — the number of independent columns, which equals the number of independent rows:
| property | statement | when you use it |
|---|---|---|
| row = column rank | switching whichever is easier to count | |
| image dimension | how much the map can reach | |
| invertibility | invertible | deciding without computing an inverse |
| solvability | solvable | classifying a system in two rank calls |
| null-space dimension | the free-variable count | |
| full rank | not the same as invertible | |
| near-dependence | rank cannot see it; use np.linalg.cond | the practical diagnostic on real data |
Linear mappings — §2.7
Section titled “Linear mappings — §2.7”| result | statement | when you use it |
|---|---|---|
| isomorphism | linear and bijective | “the same space in disguise” |
| endomorphism | linear | Chapter 4’s subject |
| automorphism | linear and bijective | invertible endomorphism |
| isomorphism theorem | finite-dimensional isomorphic | why |
| coordinates | with an ordered basis | ordering matters — coordinates are a list |
| transformation matrix | column of = coordinates of in | constructing the matrix of a map |
| coordinate mapping | matrices map coordinates, not vectors | |
| basis change | read right to left: translate in, map, translate out | |
| equivalence | general basis change | |
| similarity | endomorphisms; similar implies equivalent, not conversely | |
| composition | why multiplication is composition | |
| kernel | (the width) | what gets destroyed |
| image | (the height) | the column space; what can be reached |
| injectivity | injective | the all-pairs test collapses to one system |
| rank-nullity | a conservation law; the fundamental theorem of linear mappings | |
| three-way equivalence | if : injective surjective bijective | square matrices only — check one, get three |
| similar invariants | similar matrices share determinant, trace and eigenvalues | the fastest check on any basis change |
Affine spaces — §2.8
Section titled “Affine spaces — §2.8”| result | statement | when you use it |
|---|---|---|
| affine subspace | with a subspace | a subspace slid off the origin |
| not a subspace | excludes whenever ; not closed under either operation | it fails all three subspace tests |
| parametric equation | describing a line, plane or hyperplane | |
| containment | and | comparing two descriptions of possibly-equal sets |
| line | one support point, one direction | |
| plane | two independent directions | |
| hyperplane | codimension one, so it has two sides — the decision boundary | |
| inhomogeneous solutions | empty, or an affine subspace of dimension | §2.3’s general solution, renamed |
| single equation | with some defines a hyperplane | one equation removes one dimension |
| converse | every -dimensional affine subspace of solves some system with | affine subspaces and inhomogeneous systems coincide |
| affine mapping | , the translation vector | what a “linear layer” actually computes |
| decomposition | every affine map is uniquely a linear map followed by a translation | separating the two parts |
| preserved | dimension and parallelism | why affine maps keep flat things flat |
| augmentation trick | append to , absorb into an extra column | why design matrices have a column of ones |
The one-page summary
Section titled “The one-page summary”If you keep only six facts from Chapter 2:
Numerical cheat sheet
Section titled “Numerical cheat sheet”| you want | use | not |
|---|---|---|
| solve a square system | np.linalg.solve(A, b) | inv(A) @ b |
| least squares, any shape | np.linalg.lstsq(A, b, rcond=None) | the normal equations — they square |
| the pseudo-inverse itself | np.linalg.pinv(A) | forming |
| rank | np.linalg.matrix_rank(A) | counting nonzero singular values by eye |
| how close to singular | np.linalg.cond(A) | the rank — it cannot see near-dependence |
| matrix product | A @ B | A * B, which is the Hadamard product |
| a genuine column vector | x.reshape(-1, 1) | x.T on a 1-D array, which does nothing |
| compare two results | np.allclose(a, b) | a == b |
Recall card
Section titled “Recall card”- A group needs four properties and Abelian needs a fifth: closure, associativity, a neutral element, an inverse for every element, then commutativity. Check them in that order — closure usually fails first and costs the least to test.
- Matrix multiplication is associative and distributive but not commutative, and the shapes are the reason: AB and BA need not even have the same size, as exercise 2.4 parts (d) and (e) show at 2 by 2 against 4 by 4.
- Inverses and transposes both REVERSE the order of a product, and for the same reason: undoing two operations means undoing the last one first.
- Elementary row operations never change the solution set. That single fact is what licenses Gaussian elimination, and it is why you may reduce as aggressively as you like.
- Three outcomes, decided by two rank comparisons. Compare the rank of A with the rank of the augmented matrix for consistency, then compare the rank of A with the number of columns for uniqueness.
- The number of free variables is columns minus rank, and a column of zeros is a free variable too — exercise 2.6 has two of them, and missing them turns a three-dimensional solution set into a single point.
- The general solution is one particular solution plus the whole kernel, so the solution set has dimension equal to the number of columns minus the rank whenever the system is consistent.
- A subspace must contain the zero vector and be closed under addition and scaling. Testing for the zero vector first disposes of most candidates immediately.
- Vectors are independent exactly when the only combination giving zero is the trivial one, which is the same as saying the matrix of them has rank equal to its column count.
- More than n vectors in an n-dimensional space are always dependent — a counting argument that settles several exercises with no arithmetic at all.
- A basis is a maximal independent set, and every basis of a space has the same size. That is what makes dimension well defined rather than a property of the basis you happened to pick.
- Rank is the dimension of the column space and of the row space at once, so row rank and column rank are always equal.
- The dimension of a sum is the sum of the dimensions minus the dimension of the intersection. Rearranged, it tells you the size of an intersection before you compute a single basis vector for it: exercise 2.12 gives 3 plus 3 minus 4, so 2.
- A linear map is determined by where it sends a basis, so its matrix’s columns are the images of the basis vectors written in the target basis.
- A basis-change matrix’s columns are the new basis vectors expressed in the old basis. When you doubt the direction, check that the old basis matrix times P gives the new one.
- Similar matrices share trace, determinant, rank and eigenvalues but not their entries. If the trace moved, your basis-change arithmetic is wrong, and you learned that without redoing it.
- Injective, surjective and bijective each have a rank characterisation: full column rank, full row rank, and both at once — which for a square matrix collapses to invertibility.
Next: Analytic Geometry — adds length, angle and distance to everything above.
pch.coffeeTagline
pch.coffeeCtapch.feedbackHeading
pch.feedbackSubheading