The system AX = b, the null space, the rank-nullity theorem and the right and left pseudoinverses. Every property has its step-by-step proof: click any card to see it.
Dieser Abschnitt ist vorerst nur auf Spanisch und Englisch verfügbar.
Your system AX = b
A =
RowsColumns
b =
Examples
rank(A) = 2
2 equations and 3 unknowns.
dim Nul(A) = n − rank(A) = 3 − 2 = 1
Nul(A) is a line through the origin.
Which case you are in
Square with an inverserank(A) = m = n
Unique solution: X = A⁻¹b.
Right inverserank(A) = m < nYour system
Infinitely many solutions: X = Rb + Nul(A).
Left inverserank(A) = n < m
It can only be X = Lb, and it works if b is in Col(A).
Neither of themrank(A) < m and rank(A) < n
There is no formula with pseudoinverses.
Inverse used
It exists because rank(A) = m: AR = I.
R = Aᵗ(AAᵗ)⁻¹
R =
2/3−1/31/31/3−1/32/3
Particular solution
Xp =
121
One specific solution of AX = b, the one you get by multiplying the inverse by b.
Basis of Nul(A)
v =
1−11
Every vector v satisfies Av = 0. Adding a multiple of it to a solution gives another solution.
Pick a solution
Move the sliders: X = Xp + Xh, with Xh in Nul(A).
Check
X =
121
AX =
33
b =
33
A·X equals b: it is a solution.
01 · The system AX = b
A system of equations as a matrix product
A system of linear equations can be written as a single equality between matrices. That way everything we know about matrices helps to solve it.
Coefficient matrix AIt has one row per equation and one column per unknown: its size is m × n (m equations, n unknowns).
Vector of unknowns XThe column (x1, …, xn) with what we are looking for.
Constant terms bThe column of numbers to the right of the equals sign, of size m × 1.
SolutionA vector X with AX = b. There may be none, one or infinitely many.
Homogeneous systemThe one with b = 0, that is, AX = 0. It always has the solution X = 0.
1Worked example (the one in the notes). Two equations and three unknowns:{x1+x2=3x2+x3=3
2Each row of A holds the coefficients of one equation. Multiplying row by column reproduces the left side:(101101)x1x2x3=(x1+x2x2+x3)
3Setting it equal to the right side gives the system in matrix form, AX = b:(101101)x1x2x3=(33)
4We check with X = (1, 2, 1): 1 + 2 = 3 and 2 + 1 = 3. It is a solution, but we will see that it is not the only one.(101101)121=(33)
What it is for. Writing AX = b lets us talk about all systems at once and use rank, inverses and pseudoinverses to decide how many solutions they have and to compute them.
02 · Null space
The null space Nul(A)
It is the set of all vectors that A turns into the zero vector. It is also called the kernel.
Nul(A)Nul(A) = {X : AX = 0}: all the solutions of the homogeneous system.See proof
1Example from the notes. AX = 0 is two equations in three unknowns:{x1+x2=0x2+x3=0
2One unknown is left free: x₂ = t. We solve x₁ = −t and x₃ = −t.x2=t,x1=−t,x3=−t
3We take t out as a common factor:Nul(A)=t(−1,1,−1)
It is a line through the origin. The vector (1, −1, 1) used by the tool above describes the same line: just take t = −1.
What it is for. The null space collects «what is left over» in a system: the vectors that can be added to a solution without changing it. That is why it explains why there are infinitely many solutions.
The null space Nul(A): an example
A=(101101):Nul(A)={t(−1,1,−1):t∈R}
All the X with AX = 0. For A = (1 1 0; 0 1 1) they are the multiples of (−1, 1, −1).
See proof
03 · Dimension
Dimension and the rank-nullity theorem
The dimension measures the «size» of a set of vectors: in how many directions you can move inside it.
DimensionNumber of free letters (t, s, …) needed to write all the vectors of the set.
A pointDimension 0: no letters, you cannot move.
A lineDimension 1: one letter, X = t·v.
A planeDimension 2: two letters, X = s·v + t·w.
Rank-nullity theoremdim Nul(A) = n − rank(A): the unknowns left free are the unknowns minus the useful equations.See why
1Example with the A of the notes: n = 3 unknowns and rank 2 (the two rows are independent).n=3,r=2
2By the theorem, one unknown is left free.dimNul(A)=n−r=3−2=1
3It matches what we saw: Nul(A) = t(−1, 1, −1), a line, dimension 1.Nul(A)=t(−1,1,−1)
If the rank equals the number of rows (m) and there are more columns than rows, then dim Nul(A) = n − m > 0: there are spare unknowns, the null space has free letters and the system has infinitely many solutions. What it is for. It tells you beforehand how many free directions the set of solutions has, without solving anything.
Dimension: how many free letters you need
dim{0}=0,dim{tv}=1,dim{sv+tw}=2
A point has dimension 0, a line 1 and a plane 2: they are the free letters (t, s, …) of their vectors.
See proof
Rank-nullity theorem: dim Nul(A) = n − r
dimNul(A)=n−r
The free unknowns are the unknowns minus the useful equations (the rank). Here r = rank(A).
See proof
04 · Right pseudoinverse
More unknowns than equations: R
A pseudoinverse is a matrix that acts as an inverse on one side only, useful when A is not square and has no true inverse. For an m × n matrix A with real entries:
On the rightAR = Im. It exists only if the rank is full by rows: rank(A) = m.
FormulaR = Aᵗ(AAᵗ)⁻¹. Its size is n × m.See where it comes from
Particular solution XpXp = Rb: one concrete solution of AX = b.See why
Homogeneous solution XhAny vector of the null space: A·Xh = 0. It is what is «left over» from a solution: Xh = X − Rb.See why
All the solutionsX = Xp + Xh = Rb + Nul(A).See why
1Worked example with the A of the notes and b = (3, 3). First AAᵗ, which is 2×2 and invertible because the rank is 2:AAt=(2112),(AAt)−1=31(2−1−12)
2The right pseudoinverse:R=At(AAt)−1=3121−1−112
3We check AR = I:AR=31(3003)=(1001)
4Particular solution: Xp = Rb (sizes 3×2 times 2×1 = 3×1).Xp=Rb=3121−1−112(33)=121
5Any other solution, for example X = (0, 3, 0) (check that AX = (3, 3)). What is left over compared to Xp lies in the null space:Xh=X−Rb=(0,3,0)−(1,2,1)=(−1,1,−1)∈Nul(A)
6All the solutions: the line through Xp in the direction of the null space. With t = 0, 1, 2 we get (1, 2, 1), (0, 3, 0) and (−1, 4, −1).X=(1,2,1)+t(−1,1,−1)
What it is for. It solves systems with more unknowns than equations and full rank, which always have a solution, and describes all of them with a single formula. It can also be proved that Rb is the shortest of all the solutions.
When AAᵗ and AᵗA have an inverse
r=m⇒∃(AAt)−1
If the rank is m, AAᵗ (m×m) has an inverse; if it is n, AᵗA (n×n) has one. Here r = rank(A).
See proof
Right pseudoinverse: R = Aᵗ(AAᵗ)⁻¹
AR=Im⇒R=At(AAt)−1
If the rank is m, there is an R with AR = Im, computed as Aᵗ(AAᵗ)⁻¹. Here r = rank(A).
See proof
Particular solution: Xp = Rb
Xp=Rb⇒AXp=b
If AR = I, the vector Rb always solves AX = b.
See proof
Homogeneous solution: Xh = X − Rb is in the null space
AX=b⇒Xh=X−Rb∈Nul(A)
The difference between any solution and Rb satisfies A·Xh = 0.
See proof
All the solutions: X = Rb + Nul(A)
AX=b⟺X=Rb+Xh,Xh∈Nul(A)
The solutions of AX = b are a particular solution plus any vector of the null space.
See proof
05 · Left pseudoinverse
More equations than unknowns: L
Now the full rank is by columns: the n columns of A are independent. It is the opposite case to the previous one.
On the leftLA = In. It exists only if rank(A) = n. We say that A is injective (one to one): two different vectors never give the same result.
FormulaL = (AᵗA)⁻¹Aᵗ. Its size is n × m.See where it comes from
Solution X = LbIf the system has a solution, it is unique and equals Lb: the null space is Nul(A) = {0}.See why
Col(A)The column space (or image): all the vectors that can be formed by combining the columns of A.
When is Lb valid?Only if b ∈ Col(A). Otherwise Lb solves nothing and the system has no solution.See why
1Worked example: A is 3×2 with independent columns (rank 2 = n).A=101011,AtA=(2112),(AtA)−1=31(2−1−12)
2The left pseudoinverse (size 2×3):L=(AtA)−1At=31(2−1−1211)
3We check LA = I:LA=31(3003)=(1001)
4With b = (1, 2, 3), which is in Col(A) (3 = 1 + 2), we get the unique solution:X=Lb=31(2−1−1211)123=(12)
5With b′ = (1, 2, 0), which is NOT in Col(A), Lb′ = (0, 1) is not a solution: A(Lb′) = (0, 1, 1) ≠ b′.A(Lb′)=011=120=b′
What it is for. With more equations than unknowns (for example, many measurements for few parameters), L finds the only candidate solution, and the check A(Lb) = b tells whether it really is one. When it is not, the next step is least squares.
Left pseudoinverse: L = (AᵗA)⁻¹Aᵗ
LA=In⇒L=(AtA)−1At
If the rank is n, there is an L with LA = In, computed as (AᵗA)⁻¹Aᵗ. Here r = rank(A).
See proof
With L the solution is unique: X = Lb
LA=I⇒(AX=b⇒X=Lb)
If LA = I and the system has a solution, it can only be Lb: the null space is {0}. Here r = rank(A).
See proof
Lb is a solution if and only if b is in Col(A)
A(Lb)=b⟺b∈Col(A)
Col(A) is the set of combinations of the columns of A. If b is not there, the system has no solution.
See proof
06 · Summary
The four cases
Depending on the rank of A, the system AX = b falls into one of these cases. Click the ones with a proof.
Left · LA = Irank(A) = n (full columns, A injective). Solution X = Lb, unique, and only if b is in Col(A): at most one solution.See why
Right · AR = Irank(A) = m (full rows, A surjective). Solution X = Rb + Nul(A): there is always at least one, and infinitely many if there are more columns than rows.See why
Both · L = R = A⁻¹A square and regular (rank(A) = m = n). Solution X = A⁻¹b, unique and always exists.See why
Neither · A⁺The rank is below both m and n. We look for the solution that minimises the error ‖AX − b‖ (least squares, with the Moore-Penrose pseudoinverse A⁺). It is outside these notes.
If A is square and regular, R = L = A⁻¹
r=m=n⇒R=L=A−1
When m = n = r, both pseudoinverses coincide with the usual inverse. Here r = rank(A).
See proof
What it is for. It is the map so you do not get lost: compute the rank of A, check whether it equals m, n or both, and that tells you which formula to use and how many solutions to expect.
07 · Applications
What is the pseudoinverse for?
Fitting dataMany measurements and few parameters: more equations than unknowns. It is the case of L, and the step before least squares.
RoboticsAn arm with more joints than coordinates to reach has infinitely many solutions; Rb picks one (the one with the least movement).
Networks and flowsDistributing a flow among many paths: there is a particular solution plus a family of adjustments that do not change the total (the null space).
Compression and signalsReconstructing a signal with fewer data than values: there are infinitely many possibilities and one is chosen with the pseudoinverse.
Knowing whether a system is consistentChecking whether b is in Col(A) answers the question «does it have a solution?» without solving the whole system.
War das hilfreich?
Dieser Leitfaden ist kostenlos und werbefrei. Wenn er dir beim Lernen hilft, kannst du mir einen Kaffee spendieren.