Size: 1660
Comment:
|
Size: 3023
Comment: Notation and added triangular matrices
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
These '''special matrices''' are core concepts to linear algebra. |
|
Line 11: | Line 13: |
The '''identity matrix''' is a diagonal line of 1s in a matrix of 0s. | The '''identity matrix''' is a diagonal line of ones in a matrix of zeros. |
Line 13: | Line 15: |
Any matrix A multiplied by the (appropriately sized) identity matrix returns matrix A. | Any matrix '''''A''''' multiplied by the (appropriately sized) identity matrix returns matrix '''''A'''''. |
Line 31: | Line 33: |
A '''permutation matrix''' multiplied by matrix A returns a row- or column-exchanged transformation of A, depending on the order of multiplication. | A '''permutation matrix''' multiplied by matrix '''''A''''' returns a row- or column-exchanged transformation of '''''A'''''. If the permutation matrix leads in the multiplication, rows are exchanged. If the permutation matrix follows, columns are exchanged. |
Line 59: | Line 61: |
See [[LinearAlgebra/PermutationMatrices|Permutation Matrices]] for more information. | The transpose permutation matrix is the same as the inverse permutation matrix: '''''P'''^T^ = '''P'''^-1^''. The transpose permutation matrix multiplied by the permutation matrix is the same as the identity matrix: '''''P'''^T^'''P''' = '''I''''' === Counting Permutations === For 3 by 3 matrices, there are 6 possible permutation matrices. They are often denoted based on the rows they exchange, such as '''''P''',,2 3,,''. {{{ ┌ ┐ ┌ ┐ ┌ ┐ ┌ ┐ ┌ ┐ ┌ ┐ │ 1 0 0│ │ 1 0 0│ │ 0 1 0│ │ 0 1 0│ │ 0 0 1│ │ 0 0 1│ │ 0 1 0│ │ 0 0 1│ │ 1 0 0│ │ 0 0 1│ │ 1 0 0│ │ 0 1 0│ │ 0 0 1│ │ 0 1 0│ │ 0 0 1│ │ 1 0 0│ │ 0 1 0│ │ 1 0 0│ └ ┘ └ ┘ └ ┘ └ ┘ └ ┘ └ ┘ (identity matrix) P P (and so on...) 2,3 1,2 }}} For any ''n'' by ''n'' matrix, there are ''n''! possible permutation matrices. |
Line 65: | Line 87: |
== Inverse Matrices == | == Upper Triangular Matrices == |
Line 67: | Line 89: |
An '''inverse matrix''' A^-1^ multiplied by matrix A returns the identity matrix. | If a square matrix has only zeros below the diagonal, it is an '''upper triangular matrix'''. |
Line 69: | Line 91: |
If A^-1^ exists, then A is '''invertible''' and '''non-singular'''. Not all matrices are invertible. | [[LinearAlgebra/Elimination|Gauss-Jordan elimination]] results in a '''row echelon form''' of '''''A''''' which, if '''''A''''' is square, is also upper triangular. |
Line 71: | Line 93: |
See [[LinearAlgebra/MatrixInversion|Matrix Inversion]] for more information. | [[LinearAlgebra/Orthonormalization|Gram-Schmidt orthonormalization]] is characterized as '''''A = QR''''' where '''''R''''' is upper triangular. |
Line 77: | Line 99: |
== Symmetric Matrices == | == Lower Triangular Matrices == |
Line 79: | Line 101: |
A '''symmetric matrix''' is any matrix that is equal to its [[LinearAlgebra/MatrixTransposition|transpose]]. | If a square matrix has only zeros above the diagonal, it is a '''lower triangular matrix'''. |
Line 81: | Line 103: |
{{{ julia> A = [1 2; 2 1] 2×2 Matrix{Int64}: 1 2 2 1 julia> A == A' true }}} See [[LinearAlgebra/MatrixTransposition#SymmetricMatrices|Symmetric Matrices]] for more information. |
If [[LinearAlgebra/Elimination|Gauss-Jordan elimination]] is continued into backwards elimination, it results in a '''reduced row echelon form''' of '''''A'''''. If '''''A''''' is square, it will be both upper and lower triangular. |
Special Matrices
These special matrices are core concepts to linear algebra.
Contents
Identity Matrix
The identity matrix is a diagonal line of ones in a matrix of zeros.
Any matrix A multiplied by the (appropriately sized) identity matrix returns matrix A.
julia> using LinearAlgebra julia> Matrix{Int8}(I,3,3) 3×3 Matrix{Int8}: 1 0 0 0 1 0 0 0 1
Permutation Matrices
A permutation matrix multiplied by matrix A returns a row- or column-exchanged transformation of A. If the permutation matrix leads in the multiplication, rows are exchanged. If the permutation matrix follows, columns are exchanged.
julia> P = Matrix{Int8}(I,3,3)[:,[3,2,1]] 3×3 Matrix{Int8}: 0 0 1 0 1 0 1 0 0 julia> A = [1 2 3; 4 5 6; 7 8 9] 3×3 Matrix{Int64}: 1 2 3 4 5 6 7 8 9 julia> P * A 3×3 Matrix{Int64}: 7 8 9 4 5 6 1 2 3 julia> A * P 3×3 Matrix{Int64}: 3 2 1 6 5 4 9 8 7
The transpose permutation matrix is the same as the inverse permutation matrix: PT = P-1.
The transpose permutation matrix multiplied by the permutation matrix is the same as the identity matrix: PTP = I
Counting Permutations
For 3 by 3 matrices, there are 6 possible permutation matrices. They are often denoted based on the rows they exchange, such as P2 3.
┌ ┐ ┌ ┐ ┌ ┐ ┌ ┐ ┌ ┐ ┌ ┐ │ 1 0 0│ │ 1 0 0│ │ 0 1 0│ │ 0 1 0│ │ 0 0 1│ │ 0 0 1│ │ 0 1 0│ │ 0 0 1│ │ 1 0 0│ │ 0 0 1│ │ 1 0 0│ │ 0 1 0│ │ 0 0 1│ │ 0 1 0│ │ 0 0 1│ │ 1 0 0│ │ 0 1 0│ │ 1 0 0│ └ ┘ └ ┘ └ ┘ └ ┘ └ ┘ └ ┘ (identity matrix) P P (and so on...) 2,3 1,2
For any n by n matrix, there are n! possible permutation matrices.
Upper Triangular Matrices
If a square matrix has only zeros below the diagonal, it is an upper triangular matrix.
Gauss-Jordan elimination results in a row echelon form of A which, if A is square, is also upper triangular.
Gram-Schmidt orthonormalization is characterized as A = QR where R is upper triangular.
Lower Triangular Matrices
If a square matrix has only zeros above the diagonal, it is a lower triangular matrix.
If Gauss-Jordan elimination is continued into backwards elimination, it results in a reduced row echelon form of A. If A is square, it will be both upper and lower triangular.