Linear maps and matrices
This file defines the maps to send matrices to a linear map, and to send linear maps between modules with a finite bases to matrices. This defines a linear equivalence between linear maps between finite-dimensional vector spaces and matrices indexed by the respective bases.
Some results are proved about the linear map corresponding to a
diagonal matrix (range
, ker
and rank
).
Main definitions
to_lin
, to_matrix
, linear_equiv_matrix
Tags
linear_map, matrix, linear_equiv, diagonal
Equations
- matrix.fintype R = _.mpr pi.fintype
Evaluation of matrices gives a linear map from matrix m n R
to
linear maps (n → R) →ₗ[R] (m → R)
.
Equations
- matrix.eval = linear_map.mk₂ R matrix.mul_vec matrix.eval._proof_1 matrix.eval._proof_2 matrix.eval._proof_3 matrix.eval._proof_4
Evaluation of matrices gives a map from matrix m n R
to
linear maps (n → R) →ₗ[R] (m → R)
.
Equations
Equations
The linear map from linear maps (n → R) →ₗ[R] (m → R)
to matrix m n R
.
The map from linear maps (n → R) →ₗ[R] (m → R)
to matrix m n R
.
Equations
to_lin
is the right inverse of to_matrix
.
Linear maps (n → R) →ₗ[R] (m → R)
are linearly equivalent to matrix m n R
.
Equations
- linear_equiv_matrix' = {to_fun := linear_map.to_matrix (λ (a b : n), _inst_5 a b), map_add' := _, map_smul' := _, inv_fun := matrix.to_lin _inst_4, left_inv := _, right_inv := _}
Given bases of two modules M₁
and M₂
over a commutative ring R
, we get a linear
equivalence between linear maps M₁ →ₗ M₂
and matrices over R
indexed by the bases.
Equations
- linear_equiv_matrix hv₁ hv₂ = ((equiv_fun_basis hv₁).arrow_congr (equiv_fun_basis hv₂)).trans linear_equiv_matrix'
Builds a linear equivalence from a linear map whose determinant in some bases is a unit.
The diagonal of a square matrix.
The trace of a square matrix.
Equations
- matrix.trace n R M = {to_fun := λ (A : matrix n n M), finset.univ.sum (λ (i : n), ⇑(matrix.diag n R M) A i), map_add' := _, map_smul' := _}
An invertible matrix yields a linear equivalence from the free module to itself.
Equations
The dimension of the space of finite dimensional matrices is the product of the number of rows and columns.
The natural map that reindexes a matrix's rows and columns with equivalent types is an equivalence.
The natural map that reindexes a matrix's rows and columns with equivalent types is a linear equivalence.
Equations
- matrix.reindex_linear_equiv eₘ eₙ = {to_fun := (matrix.reindex eₘ eₙ).to_fun, map_add' := _, map_smul' := _, inv_fun := (matrix.reindex eₘ eₙ).inv_fun, left_inv := _, right_inv := _}
For square matrices, the natural map that reindexes a matrix's rows and columns with equivalent types is an equivalence of algebras.
Equations
- matrix.reindex_alg_equiv e = {to_fun := (matrix.reindex_linear_equiv e e).to_fun, inv_fun := (matrix.reindex_linear_equiv e e).inv_fun, left_inv := _, right_inv := _, map_mul' := _, map_add' := _, commutes' := _}
The trace of an endomorphism given a basis.
Equations
- linear_map.trace_aux R hb = (matrix.trace ι R R).comp ↑(linear_equiv_matrix hb hb)
where ι
and κ
can reside in different universes
Trace of an endomorphism independent of basis.
The natural equivalence between linear endomorphisms of finite free modules and square matrices is compatible with the algebra structures.
Equations
- alg_equiv_matrix' = {to_fun := linear_equiv_matrix'.to_fun, inv_fun := linear_equiv_matrix'.inv_fun, left_inv := _, right_inv := _, map_mul' := _, map_add' := _, commutes' := _}
A linear equivalence of two modules induces an equivalence of algebras of their endomorphisms.
A basis of a module induces an equivalence of algebras from the endomorphisms of the module to square matrices.