|
Size: 2588
Comment:
|
Size: 3232
Comment: Cleanup
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 3: | Line 3: |
| The '''rank''' of a matrix is the number of pivots and the number of dimensions that the column space of a matrix occupies. | The '''rank''' of a matrix is the number of pivots and the number of dimensions that the column space of a matrix spans. |
| Line 11: | Line 11: |
| == Rank and Dimension == | == Description == |
| Line 13: | Line 13: |
| A matrix with ''n'' dimensions exists in ''R^n^'' space. However, the column space of that same matrix does not necessarily exist in the same number of dimensions. Consider a matrix like: |
A matrix '''''A''''' with ''n'' columns (or a linear system with ''n'' variables) exists in ''R^n^'' space. However, the '''column space''' of '''''A''''' (notated as ''C('''A''')'') does not necessarily span all of those dimensions. Consider: |
| Line 18: | Line 16: |
| ┌ ┐ │ 1 2 3│ │ 1 3 4│ │ 1 4 5│ └ ┘ |
julia> using RowEchelon julia> rref([1 2 3 1 3 4 1 4 5]) 3×3 Matrix{Float64}: 1.0 0.0 1.0 0.0 1.0 1.0 0.0 0.0 0.0 |
| Line 25: | Line 27: |
| The third column vector can be trivially shown to not be '''independent'''; it is a sum of the first and second column vectors. Correspondingly, the [[LinearAlgebra/Elimination|eliminated]] form of the matrix has two pivots and a free variable. As a direct consequence of this being a square matrix (''n x n''), this also means that there are two pivot rows and a zero row. | The [[LinearAlgebra/Elimination|elimination]] of this matrix reveals that there are two pivot columns and a free variable. |
| Line 27: | Line 29: |
| {{{ ┌ ┐ │ [1] 2 3│ │ 0 [1] 1│ │ 0 0 0│ └ ┘ }}} |
The '''rank''' of a matrix is the number of pivots. Equivalent, it is the number of dimensions that the column space of a matrix spans. |
| Line 35: | Line 31: |
| This matrix does not have '''basis''' in ''R^3^'' space. The requirements for basis are that each column be independent and that the matrix span all dimensions. | |
| Line 37: | Line 32: |
| That matrix does contain two independent columns however, and if those are split off as: | |
| Line 39: | Line 33: |
| {{{ ┌ ┐ │ 1 2│ │ 1 3│ │ 1 4│ └ ┘ }}} |
=== Relation to Bases === |
| Line 47: | Line 35: |
| Then this new matrix has basis for the column space of the matrix, which happens to be 2 dimensional. | A [[LinearAlgebra/Basis|basis]] vector must be independent. It follows that a matrix of ''n'' columns must be of '''full rank''' to be a basis for ''R^n^'' space. |
| Line 49: | Line 37: |
| Effectively, this matrix expresses a 2-dimensional plane that exists within a 3-dimensional space, but it is bound to that plane and cannot vary across the third dimension. | Note that in the above example, '''''A''''' has two independent columns. If the third column is excluded, then clearly the matrix exists in ''R^2^'' space rather than ''R^3^'' space. But the matrix is now of full rank, and therefore forms a basis for ''R^2^'' space. |
| Line 55: | Line 43: |
| == Categories for Solutions == | == Solutions == |
| Line 57: | Line 45: |
| If a matrix has a pivot in each column, it is said to be '''full column rank'''. The only [[LinearAlgebra/NullSpaces|null space]] is the zero vector (i.e. ''[0 ...]''). ''Ax = b'' either has one solution or is not solvable. Incidentally, the [[LinearAlgebra/Elimination#Reduced_Row_Echelon_Form|reduced row echelon form]] (''R'') looks like the [[LinearAlgebra/SpecialMatrices#Identity_Matrix|identity matrix]] (''I'') with some number of zero rows. | The rank of a matrix reveals the number of solutions that exist. |
| Line 59: | Line 47: |
| If a matrix has a pivot in each row, it is said to be '''full row rank'''. This only means that ''Ax = b'' can be solved for any ''b''. | If a matrix with ''n'' columns has ''n'' pivots, it is said to be '''full column rank'''. The only [[LinearAlgebra/NullSpace|null space]] is the zero vector (i.e. ''[0 ...]''). '''''A'''x = b'' either has one solution, or ''b'' is not in the column space of '''''A''''' (i.e., no solution exists). Incidentally, the [[LinearAlgebra/Elimination#Reduced_Row_Echelon_Form|reduced row echelon form]] ('''''R''''') looks like the [[LinearAlgebra/SpecialMatrices#Identity_Matrix|identity matrix]] ('''''I''''') with zero rows interspersed. |
| Line 61: | Line 49: |
| If a square matrix has '''full rank''', the reduced row echelon form (''R'') of the matrix is the identity matrix (''I''). The only null space is the zero vector; ''Ax = b'' can be solved for any ''b''; there is exactly one solution for any given ''b''. | If a matrix with ''m'' '''rows''' has ''m'' pivots, it is said to be '''full row rank'''. This means that '''''A'''x = b'' can be solved for any ''b''. |
| Line 63: | Line 51: |
| If a matrix is none of the above, ''Ax = b'' either can be solved for any ''b'' or is not solvable. | If a square matrix has '''full rank''', it meets both of those criteria and inherits all of those properties: * The only null space is the zero vector. * '''''A'''x = b'' can be solved for any ''b''. * '''''A'''x = b'' either has one solution or is not solvable, except property #2 revealed that '''''A'''x = b'' can be solved for any ''b'', so the only logical conclusion is that there is exactly one solution for any given ''b''. * The reduced row echelon form ('''''R''''') looks like the identity matrix ('''''I''''') with zero rows interspersed, except there are no dependent rows, so '''''R''''' is ''exactly'' the same as '''''I'''''. In any other case, '''''A'''x = b'' either can be solved for any ''b'', or ''b'' is not in the column space of '''''A''''' (i.e., no solution exists). Lastly, rank provides a simple method to determine if ''b'' is in the column space of '''''A''''' (i.e., a solution exists): compose the augmented matrix ''['''A''' | b]''. If ''rank('''A''') = rank(['''A''' | b])'', then ''b'' must be in the column space. |
Rank
The rank of a matrix is the number of pivots and the number of dimensions that the column space of a matrix spans.
Contents
Description
A matrix A with n columns (or a linear system with n variables) exists in Rn space. However, the column space of A (notated as C(A)) does not necessarily span all of those dimensions. Consider:
julia> using RowEchelon
julia> rref([1 2 3
1 3 4
1 4 5])
3×3 Matrix{Float64}:
1.0 0.0 1.0
0.0 1.0 1.0
0.0 0.0 0.0The elimination of this matrix reveals that there are two pivot columns and a free variable.
The rank of a matrix is the number of pivots. Equivalent, it is the number of dimensions that the column space of a matrix spans.
Relation to Bases
A basis vector must be independent. It follows that a matrix of n columns must be of full rank to be a basis for Rn space.
Note that in the above example, A has two independent columns. If the third column is excluded, then clearly the matrix exists in R2 space rather than R3 space. But the matrix is now of full rank, and therefore forms a basis for R2 space.
Solutions
The rank of a matrix reveals the number of solutions that exist.
If a matrix with n columns has n pivots, it is said to be full column rank. The only null space is the zero vector (i.e. [0 ...]). Ax = b either has one solution, or b is not in the column space of A (i.e., no solution exists). Incidentally, the reduced row echelon form (R) looks like the identity matrix (I) with zero rows interspersed.
If a matrix with m rows has m pivots, it is said to be full row rank. This means that Ax = b can be solved for any b.
If a square matrix has full rank, it meets both of those criteria and inherits all of those properties:
- The only null space is the zero vector.
Ax = b can be solved for any b.
Ax = b either has one solution or is not solvable, except property #2 revealed that Ax = b can be solved for any b, so the only logical conclusion is that there is exactly one solution for any given b.
The reduced row echelon form (R) looks like the identity matrix (I) with zero rows interspersed, except there are no dependent rows, so R is exactly the same as I.
In any other case, Ax = b either can be solved for any b, or b is not in the column space of A (i.e., no solution exists).
Lastly, rank provides a simple method to determine if b is in the column space of A (i.e., a solution exists): compose the augmented matrix [A | b]. If rank(A) = rank([A | b]), then b must be in the column space.
