Elementary operations, echelon form, rank and inverse of a matrix with the Gauss-Jordan method. Every property has its step-by-step proof: click any card to see it.
Pour l'instant, cette section n'existe qu'en espagnol et en anglais.
Your matrix
A =
RowsColumns
Examples
Step by step
1234
Starting matrix: no operation has been done yet.
Step 0 of 1
Result
rank(A) = 2
The rank is the number of non-zero rows of the echelon form: 2.
The rank never exceeds min(2, 2) = 2, the smaller of the two sizes.
det(A) = −2
The determinant is not 0: A has an inverse.
What A does to the plane
Unit squareImage under A
The columns of A are the images of the vectors e₁ = (1, 0) and e₂ = (0, 1).
Signed area of the image = det(A) = −2. The determinant is negative: the figure is flipped over.
rank(A) = 2: the plane is not flattened and the square, which had area 1, now has area 2.
01 · Elementary operations
Elementary row operations
To study a matrix (solve it, measure it, invert it) we do row operations that do not change what matters. There are three, and each one can be undone.
Swap two rowsRi ↔ Rj. It changes the order of the rows without touching their numbers.
Multiply a row by k ≠ 0Ri ← k·Ri. Every entry of the row is multiplied by k. With k = 0 the row would be destroyed, so it is not allowed.
Add a multiple of another rowRi ← Ri + k·Rj. To every entry of row i we add k times the entry of row j. It is the operation that makes zeros.
Elementary matrix EThe identity after doing ONE elementary operation to it. Multiplying EA does that operation to A.See proof
All of them can be undoneEach operation is cancelled by another of the same type, so every elementary matrix has an inverse.See why
1Worked example. We want a 0 below the 1 in the first column of A. We do R₂ ← R₂ − 3·R₁: from row 2 we subtract 3 times row 1.A=(1324)
2We compute the new row: (3, 4) − 3·(1, 2) = (0, −2).(1324)∼(102−2)
3The same operation done with the elementary matrix E (the identity with that operation already done):EA=(1−301)(1324)=(102−2)
4To swap R₁ ↔ R₂ we use the identity with its rows swapped:(0110)(1324)=(3142)
What it is for. They are the only moves allowed in Gauss's method. Since each one is the same as multiplying by a matrix, a chain of operations is a product of matrices, and that lets us prove things about rank and inverses.
An elementary operation = multiplying by an elementary matrix
(1−301)(1324)=(102−2)
Doing a row operation to A is the same as multiplying A on the left by a matrix E.
See proof
Every elementary operation can be undone
(1−301)−1=(1301)
Elementary matrices always have an inverse, and it is another elementary matrix.
See proof
02 · Row equivalence
Row-equivalent matrices
Two matrices of the same size are row equivalent when one comes from the other by elementary operations. We write A ~ B.
A ~ BThere is a matrix F ∈ Mm(K), a product of elementary matrices, with B = FA. If we work on columns, B = AC with C ∈ Mn(K).
[ Im | A ] ~ [ P | B ]If we do to [I | A] the same operations that take A to B, P is left on the left and B = PA. P keeps a record of everything that was done.See why
1Worked example with A = (1 2; 3 4). We write [I | A].(10011324)
2We do R₂ ← R₂ − 3·R₁ and then R₁ ← R₁ + R₂.(1−301102−2)∼(−2−311100−2)
3P is left on the left and B on the right. We check that B = PA:PA=(−2−311)(1324)=(100−2)=B
Note. The notes call this «similarity», but the usual name is row equivalence: in linear algebra, «similar» means something else (B = P⁻¹AP). What it is for. P sums up all the operations in a single matrix: it is the basis for computing inverses and for understanding the rank.
[I | A] ~ [P | B] implies B = PA
[I∣A]∼[P∣B]⇒B=PA
If you do to [I | A] the same operations that take A to B, the matrix P is left on the left with B = PA.
See proof
03 · Echelon form
Echelon matrix and reduced form
Reducing to echelon form means using row operations to give the matrix a staircase shape. That shows at a glance how many «real» rows it has.
Echelon matrixIt meets two conditions: (1) all rows of zeros are at the bottom; (2) the first non-zero entry of each row is to the right of the first non-zero entry of the row above.
PivotThe first non-zero entry of a row of the echelon matrix.
For every A there is a P with PA = EWe can always reach an echelon matrix E with elementary operations: PA = E, and P comes from [I | A] ~ [P | E].
Reduced formThe echelon matrix with every pivot equal to 1 and zeros above each pivot too. With the pivots in the first columns it looks like [I X; 0 0] or [I X]; the size of I is the rank.
1Worked example. The first entry of A is 0, so it cannot be a pivot.A=012113214
2We swap R₁ ↔ R₂ to get a 1 at the top left.102113124
3We make zeros below the first pivot: R₃ ← R₃ − 2·R₁ leaves the row (0, 1, 2).100111122
4R₃ ← R₃ − R₂ cancels row 3. It is now in echelon form: two pivots (1 and 1).100110120
5For the reduced form we put a 0 above the second pivot: R₁ ← R₁ − R₂.100010−120
6On the left of the bar we get the 2×2 identity (plus a row of zeros): the rank is 2.(I20X0),X=(−12)
Mind where the pivots areWith row operations alone the pivots sometimes do not fall in the first columns. For example, (1 2 0; 0 0 1) has pivots in columns 1 and 3: the identity is «spread out» and we would also need to swap columns to see [I X]. The number of pivots is still the rank.
What it is for. The echelon form turns a complicated matrix into one with the same information but easy to read: rank, solutions of a system, inverse.
04 · Rank
Rank of a matrix
The rank counts how many «independent» rows a matrix has: how many survive when it is reduced. A row that is a combination of others adds nothing new.
Rank rank(A)Number of non-zero rows of an echelon matrix row-equivalent to A. It is the same as the number of pivots.
rank(A) = rank(Aᵗ)Counting by rows or by columns gives the same number.
Limit: rank(A) ≤ min(m, n)There is at most one pivot per row and per column. In a 4×5 matrix the rank is at most 4.
Full rankWhen the rank reaches the largest possible value: rank(A) = min(m, n).
There are four ways to compute the rank. The first two use the determinant, a number computed from a square matrix: for a 2×2, det = ad − bc (main diagonal minus the other one); for a 3×3 we use Sarrus's rule: det = aei + bfg + cdh − ceg − bdi − afh, where the letters are the entries row by row. A 2×2 minor is the determinant of a 2×2 submatrix (we choose two rows and two columns).
2 × 2det ≠ 0 → rank 2. det = 0 → rank 1 (or 0 if every entry is 0).See why
3 × 3With Sarrus: det ≠ 0 → rank 3. If det = 0, look for a non-zero 2×2 minor: if there is one, rank 2; if they are all 0, rank 1 (or 0 if the matrix is zero).See proof
GaussReduce to echelon form and count the non-zero rows. Best when the matrix is 4×4 or larger, not square, or has many zeros.
TriangularThe determinant is the product of the diagonal. If there are no zeros on the diagonal, the rank is full (n).See why
1Worked example with Gauss on a non-square 3×4 matrix:A=123246101325
2R₂ ← R₂ − 2·R₁ and R₃ ← R₃ − 3·R₁ make zeros below the first pivot.1002001−2−23−4−4
3Column 2 can no longer hold a pivot. The second pivot is in column 3: R₃ ← R₃ − R₂.1002001−203−40
4There are two non-zero rows: the rank is 2, below the largest possible value, min(3, 4) = 3.r=2<min(3,4)
What it is for. The rank measures how much independent information a matrix holds. It says whether a system has a unique solution, whether a square matrix has an inverse (rank n) and how many unknowns stay free.
Rank of a 2×2 matrix with the determinant
det=ad−bc=0⟺r=2
If det ≠ 0 the rank is 2; if det = 0 the rank is 1 (or 0 if every entry is 0). Here r = rank(A).
See proof
Rank of a 3×3 matrix: Sarrus, minors and Gauss
A=012113214:detA=0,r=2
Three paths to the same rank: the Sarrus determinant, a non-zero 2×2 minor and the echelon form. Here r = rank(A).
See proof
Rank of a triangular matrix
t1100∗⋱0∗∗tnn=t11t22⋯tnn
The determinant is the product of the diagonal: if there are no zeros on it, the rank is full. Here r = rank(A).
See proof
05 · Inverse
Inverse of a matrix
The inverse of a matrix is the one that «undoes» it, just as dividing undoes multiplying. It can only exist if the matrix is square.
Inverse A⁻¹For A ∈ Mn(ℝ or ℂ), the matrix B in Mn with AB = BA = In. It is written A⁻¹.
Regular and singularA matrix with an inverse is called regular; without one, singular.
When does it exist?If and only if det A ≠ 0, or equivalently rank(A) = n.See why
How is it computed? Gauss-JordanWe write [A | In] and operate on rows until we reach [In | B]. Then B is A⁻¹.See why
1Worked 3×3 example: we write [A | I].105216340100010001
2R₃ ← R₃ − 5·R₁: we make the 5 in the first column a 0.10021−434−1510−5010001
3R₁ ← R₁ − 2·R₂ and R₃ ← R₃ + 4·R₂: zeros in the second column (except the pivot).100010−54110−5−214001
4R₁ ← R₁ + 5·R₃ and R₂ ← R₂ − 4·R₃: zeros in the third column.100010001−2420−518−1545−41
5On the left we now have I; on the right, the inverse.A−1=−2420−518−1545−41
6Check of the first row of A·A⁻¹ (the rest is checked the same way): (1, 2, 3) times each column of A⁻¹ gives 1, 0, 0.1(−24)+2⋅20+3(−5)1⋅18+2(−15)+3⋅41⋅5+2(−4)+3⋅1=1=0=0
1If it does not exist: A = (1 2; 2 4) has rank 1. When we reduce [A | I], a whole row on the left vanishes and I is never reached.(12241001)∼(10201−201)
For 2×2 matrices there is a shortcut: A⁻¹ = (1/det)·(d −b; −c a), that is, swap the entries of the main diagonal, change the sign of the other two and divide by the determinant. What it is for. With the inverse you «divide» by a matrix: solve systems, undo a transformation or isolate a matrix in an equation.
Why [A | I] ~ [I | A⁻¹] computes the inverse
[A∣I]∼[I∣A−1]
The same operations that take A to I, applied to the identity, turn it into A⁻¹.
See proof
Example: computing an inverse with Gauss-Jordan
(1225)−1=(5−2−21)
From [A | I] to [I | A⁻¹] step by step with A = (1 2; 2 5), and a check.
See proof
It has an inverse if and only if the rank is n
∃A−1⟺r=n
A square n×n matrix is invertible exactly when its rank is n. Here r = rank(A).
See proof
06 · Properties
Properties of the inverse and systems
Given two regular square matrices A and B of the same order:
Inverse of the transpose
(At)−1=(A−1)t
The inverse of the transpose is the transpose of the inverse. Example: A = (1 2; 3 5) has A⁻¹ = (−5 2; 3 −1), and (Aᵗ)⁻¹ = (−5 3; 2 −1) = (A⁻¹)ᵗ.
See proof
Inverse of a product
(AB)−1=B−1A−1
The inverse of a product is the product of the inverses in REVERSE ORDER, like taking off your shoes and socks. Example with A = (1 2; 0 1) and B = (1 0; 3 1): (AB)⁻¹ = (1 −2; −3 7).
See proof
Solving a system
AX=b
X=A−1b
To solve a system with a regular A, multiply on the left by A⁻¹: (A⁻¹A)X = A⁻¹b. Example: 2x + y = 3, x + y = 2 gives X = (1, 1).
See proof
What it is for. These rules let you invert, transpose and multiply in whichever order is more convenient without recomputing from scratch. And the last one is the most used: if A is square with an inverse, the system always has a unique solution. When A is not square (more equations than unknowns or the other way round) we need the pseudoinverse, which is the next topic.
07 · Applications
What are rank and inverse for?
Solving systemsCircuits, structures or prices: many equations at once. With A⁻¹, the solution is X = A⁻¹b for any b.
Knowing whether the solution is uniqueIf the rank of A equals the number of unknowns, there is no freedom: the solution, if it exists, is unique.
Graphics and animationRotating or scaling an object is multiplying by a matrix; the inverse undoes the movement, for example to go from the screen back to the 3D world.
CryptographyIn the Hill cipher a message is encrypted by multiplying by a matrix; it is decrypted with its inverse (which must exist).
EconomicsIn Leontief's model, the production needed to meet a demand d is obtained with (I − C)⁻¹d.
Data and statisticsThe rank tells how many truly independent variables a data table has, and how many are redundant.
Ça t'a été utile ?
Ce guide est gratuit et sans publicité. S'il t'aide à réviser, tu peux m'offrir un café.