Linear algebra #
This file defines the basics of linear algebra. It sets up the "categorical/lattice structure" of modules over a ring, submodules, and linear maps.
Many of the relevant definitions, including Module
, Submodule
, and LinearMap
, are found in
Algebra/Module
.
Main definitions #
- Many constructors for (semi)linear maps
- The kernel
ker
and rangerange
of a linear map are submodules of the domain and codomain respectively.
See LinearAlgebra.Span
for the span of a set (as a submodule),
and LinearAlgebra.Quotient
for quotients by submodules.
Main theorems #
See LinearAlgebra.Isomorphisms
for Noether's three isomorphism theorems for modules.
Notations #
- We continue to use the notations
M →ₛₗ[σ] M₂
andM →ₗ[R] M₂
for the type of semilinear (resp. linear) maps fromM
toM₂
over the ring homomorphismσ
(resp. over the ringR
).
Implementation notes #
We note that, when constructing linear maps, it is convenient to use operations defined on bundled
maps (LinearMap.prod
, LinearMap.coprod
, arithmetic operations like +
) instead of defining a
function and proving it is linear.
TODO #
- Parts of this file have not yet been generalized to semilinear maps
Tags #
linear algebra, vector space, module
Given Finite α
, linearEquivFunOnFinite R
is the natural R
-linear equivalence between
α →₀ β
and α → β
.
Instances For
decomposing x : ι → R
as a sum along the canonical basis
Properties of linear maps #
The restriction of a linear map f : M → M₂
to a submodule p ⊆ M
gives a linear map
p → M₂
.
Instances For
A linear map f : M₂ → M
whose values lie in a submodule p ⊆ M
can be restricted to a
linear map M₂ → p.
Instances For
Restrict domain and codomain of a linear map.
Instances For
Evaluation of a σ₁₂
-linear map at a fixed a
, as an AddMonoidHom
.
Instances For
LinearMap.toAddMonoidHom
promoted to a AddMonoidHom
Instances For
When f
is an R
-linear map taking values in S
, then fun ↦ b, f b • x
is an R
-linear
map.
Instances For
A linear map f
applied to x : ι → R
can be computed using the image under f
of elements
of the canonical basis.
Applying a linear map at v : M
, seen as S
-linear map from M →ₗ[R] M₂
to M₂
.
See LinearMap.applyₗ
for a version where S = R
.
Instances For
The equivalence between R-linear maps from R
to M
, and points of M
itself.
This says that the forgetful functor from R
-modules to types is representable, by R
.
This as an S
-linear equivalence, under the assumption that S
acts on M
commuting with R
.
When R
is commutative, we can take this to be the usual action with S = R
.
Otherwise, S = ℕ
shows that the equivalence is additive.
See note [bundled maps over different rings].
Instances For
Composition by f : M₂ → M₃
is a linear map from the space of linear maps M → M₂
to the space of linear maps M₂ → M₃
.
Instances For
Applying a linear map at v : M
, seen as a linear map from M →ₗ[R] M₂
to M₂
.
See also LinearMap.applyₗ'
for a version that works with two different semirings.
This is the LinearMap
version of toAddMonoidHom.eval
.
Instances For
Alternative version of domRestrict
as a linear map.
Instances For
The family of linear maps M₂ → M
parameterised by f ∈ M₂ → R
, x ∈ M
, is linear in f
, x
.
Instances For
The R
-linear equivalence between additive morphisms A →+ B
and ℕ
-linear morphisms A →ₗ[ℕ] B
.
Instances For
The R
-linear equivalence between additive morphisms A →+ B
and ℤ
-linear morphisms A →ₗ[ℤ] B
.
Instances For
Properties of submodules #
If two submodules p
and p'
satisfy p ⊆ p'
, then ofLe p p'
is the linear map version of
this inclusion.
Instances For
The pushforward of a submodule p ⊆ M
by f : M → M₂
Instances For
The pushforward of a submodule by an injective linear map is
linearly equivalent to the original submodule. See also LinearEquiv.submoduleMap
for a
computable version when f
has an explicit inverse.
Instances For
The pullback of a submodule p ⊆ M₂
along f : M → M₂
Instances For
map f
and comap f
form a GaloisInsertion
when f
is surjective.
Instances For
map f
and comap f
form a GaloisCoinsertion
when f
is injective.
Instances For
A linear isomorphism induces an order isomorphism of submodules.
Instances For
The infimum of a family of invariant submodule of an endomorphism is also an invariant submodule.
Properties of linear maps #
The range of a linear map f : M → M₂
is a submodule of M₂
.
See Note [range copy pattern].
Instances For
A linear map version of AddMonoidHom.eqLocusM
Instances For
Restrict the codomain of a linear map f
to f.range
.
This is the bundled version of Set.rangeFactorization
.
Instances For
The range of a linear map is finite if the domain is finite.
Note: this instance can form a diamond with Subtype.fintype
in the
presence of Fintype M₂
.
The kernel of a linear map f : M → M₂
is defined to be comap f ⊥
. This is equivalent to the
set of x : M
such that f x = 0
. The kernel is a submodule of M
.
Instances For
Under the canonical linear map from a submodule p
to the ambient space M
, the image of the
maximal submodule of p
is just p
.
If p ⊆ M
is a submodule, the ordering of submodules of p
is embedded in the ordering of
submodules of M
.
Instances For
A monomorphism is injective.
If O
is a submodule of M
, and Φ : O →ₗ M'
is a linear map,
then (ϕ : O →ₗ M').submoduleImage N
is ϕ(N)
as a submodule of M'
Instances For
Linear equivalences #
Between two zero modules, the zero map is an equivalence.
Between two zero modules, the zero map is the only equivalence.
A linear equivalence of two modules restricts to a linear equivalence from any submodule
p
of the domain onto the image of that submodule.
This is the linear version of AddEquiv.submonoidMap
and AddEquiv.subgroupMap
.
This is LinearEquiv.ofSubmodule'
but with map
on the right instead of comap
on the left.