Section 16 Matrix Groups
16.1 The General Linear Group \(GL_n(\mathbb{R})\)
The general linear group \(GL_n(\mathbb{R})\) is the group of all invertible \(n \times n\) matrices with entries from the real numbers \(\mathbb{R}\). This is the world we lived in when we worked with square invertible matrices (and the invertible matrix theorem) in Math 236 Linear Algebra.
Remember that R has a funny matrix multiplication symbol: %*%
. For example,
## [,1] [,2] [,3]
## [1,] -4 2 3
## [2,] -8 6 5
## [3,] -13 7 6
## [,1] [,2] [,3]
## [1,] 0 -3 2
## [2,] 9 4 3
## [3,] 10 5 4
illustrating that matrix multiplication is not-commutative and \(GL_n(\mathbb{R})\) is a nonabelian group.
The identity matrix is the identity element of the group, and it can be defined with diag(n)
. If you have pracma
loaded then you can invert the matrix A with inv(A)
otherwise, in base R, you can use solve(A)
.
## [,1] [,2] [,3]
## [1,] 0 -1 1
## [2,] 1 1 -1
## [3,] -1 2 -1
## [,1] [,2] [,3]
## [1,] 1 0 0
## [2,] 0 1 0
## [3,] 0 0 1
## [,1] [,2] [,3]
## [1,] 1 1 0
## [2,] 2 1 1
## [3,] 3 1 1
16.2 Matrix Multiplication Mod m: \(GL_n(\mathbb{Z}_m)\)
You can use the mod
command from pracma
to do matrix multiplication mod m.
For example, notice how the product looks very different for different \(\mathbb{Z}_m\).
## [,1] [,2]
## [1,] -4 -2
## [2,] -11 -6
## [,1] [,2]
## [1,] 0 0
## [2,] 1 0
## [,1] [,2]
## [1,] 2 1
## [2,] 1 0
## [,1] [,2]
## [1,] 0 2
## [2,] 1 2