The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V07. Linear algebra

Mathlib.LinearAlgebra.Determinant

100 declarations. Mathlib docs · Source

Determinant of families of vectors

This file defines the determinant of an endomorphism, and of a family of vectors with respect to some basis. For the determinant of a matrix, see the file LinearAlgebra.Matrix.Determinant.

Main definitions

In the list below, and in all this file, R is a commutative ring (semiring is sometimes enough), M and its variations are R-modules, ι, κ, n and m are finite types used for indexing.

  • Basis.det: the determinant of a family of vectors with respect to a basis, as a multilinear map
  • LinearMap.det: the determinant of an endomorphism f : End R M as a multiplicative homomorphism (if M does not have a finite R-basis, the result is 1 instead)
  • LinearEquiv.det: the determinant of an isomorphism f : M ≃ₗ[R] M as a multiplicative homomorphism (if M does not have a finite R-basis, the result is 1 instead)

Tags

basis, det, determinant

Determinant of a linear map

theorem LinearMap.equivOfIsUnitDet.match_1.congr_eq_1 E1 #

∀ {R : Type u_2} [inst : CommRing R] {M : Type u_1} [inst_1 : AddCommGroup M] [inst_2 : Module R M]
  (motive : (I : Type u_1) × Module.Basis I R M → Sort u_3) (x : (I : Type u_1) × Module.Basis I R M)
  (h_1 : (ι : Type u_1) → (b : Module.Basis ι R M) → motive ⟨ι, b⟩) (ι : Type u_1) (b : Module.Basis ι R M),
  x = ⟨ι, b⟩ →
    (match x with
      | ⟨ι, b⟩ => h_1 ι b) ≍
      h_1 ι b

theorem LinearMap.detAux.congr_simp E1 #

∀ {M : Type u_2} [inst : AddCommGroup M] {ι : Type u_4} {inst_1 : DecidableEq ι} [inst_2 : DecidableEq ι]
  [inst_3 : Fintype ι] {A : Type u_5} [inst_4 : CommRing A] [inst_5 : Module A M] (a a_1 : Trunc (Module.Basis ι A M)),
  a = a_1 → LinearMap.detAux a = LinearMap.detAux a_1

theorem LinearEquiv.ofIsUnitDet.congr_simp E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {M' : Type u_3}
  [inst_3 : AddCommGroup M'] [inst_4 : Module R M'] {ι : Type u_4} {inst_5 : DecidableEq ι} [inst_6 : DecidableEq ι]
  [inst_7 : Fintype ι] {f f_1 : M →ₗ[R] M'} (e_f : f = f_1) {v v_1 : Module.Basis ι R M} (e_v : v = v_1)
  {v' v'_1 : Module.Basis ι R M'} (e_v' : v' = v'_1) (h : IsUnit ((LinearMap.toMatrix v v') f).det),
  LinearEquiv.ofIsUnitDet h = LinearEquiv.ofIsUnitDet ⋯

theorem LinearMap.equivOfIsUnitDet.congr_simp E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M]
  [inst_3 : Module.Free R M] [inst_4 : Module.Finite R M] {f f_1 : M →ₗ[R] M} (e_f : f = f_1)
  (h : IsUnit (LinearMap.det f)), LinearMap.equivOfIsUnitDet h = LinearMap.equivOfIsUnitDet ⋯

def equivOfPiLEquivPi E1 #

{m : Type u_6} →
  {n : Type u_7} →
    {R : Type u_8} → [Finite m] → [Finite n] → [inst : CommRing R] → [Nontrivial R] → ((m → R) ≃ₗ[R] n → R) → m ≃ n

If R^m and R^n are linearly equivalent, then m and n are also equivalent.

def Matrix.indexEquivOfInv E1 #

{A : Type u_5} →
  [inst : CommRing A] →
    {m : Type u_6} →
      {n : Type u_7} →
        [inst_1 : Fintype m] →
          [inst_2 : Fintype n] →
            [Nontrivial A] →
              [inst_4 : DecidableEq m] →
                [inst_5 : DecidableEq n] → {M : Matrix m n A} → {M' : Matrix n m A} → M * M' = 1 → M' * M = 1 → m ≃ n

If M and M' are each other's inverse matrices, they are square matrices up to equivalence of types.

theorem Matrix.det_comm E1 #

∀ {A : Type u_5} [inst : CommRing A] {n : Type u_7} [inst_1 : Fintype n] [inst_2 : DecidableEq n] (M N : Matrix n n A),
  (M * N).det = (N * M).det

theorem Matrix.det_comm' E1 #

∀ {A : Type u_5} [inst : CommRing A] {m : Type u_6} {n : Type u_7} [inst_1 : Fintype m] [inst_2 : Fintype n]
  [inst_3 : DecidableEq m] [inst_4 : DecidableEq n] {M : Matrix n m A} {N M' : Matrix m n A},
  M * M' = 1 → M' * M = 1 → (M * N).det = (N * M).det

If there exists a two-sided inverse M' for M (indexed differently), then det (N * M) = det (M * N).

theorem Matrix.det_conj_of_mul_eq_one E1 #

∀ {A : Type u_5} [inst : CommRing A] {m : Type u_6} {n : Type u_7} [inst_1 : Fintype m] [inst_2 : Fintype n]
  [inst_3 : DecidableEq m] [inst_4 : DecidableEq n] {M : Matrix m n A} {M' : Matrix n m A} {N : Matrix n n A},
  M * M' = 1 → M' * M = 1 → (M * N * M').det = N.det

If M' is a two-sided inverse for M (indexed differently), det (M * N * M') = det N.

See Matrix.det_conj and Matrix.det_conj' for the case when M' = M⁻¹ or vice versa.

theorem LinearMap.det_toMatrix_eq_det_toMatrix E1 #

∀ {M : Type u_2} [inst : AddCommGroup M] {ι : Type u_4} [inst_1 : DecidableEq ι] [inst_2 : Fintype ι] {A : Type u_5}
  [inst_3 : CommRing A] [inst_4 : Module A M] {κ : Type u_6} [inst_5 : Fintype κ] [inst_6 : DecidableEq κ]
  (b : Module.Basis ι A M) (c : Module.Basis κ A M) (f : M →ₗ[A] M),
  ((LinearMap.toMatrix b b) f).det = ((LinearMap.toMatrix c c) f).det

The determinant of LinearMap.toMatrix does not depend on the choice of basis.

def LinearMap.detAux E0 #

{M : Type u_2} →
  [inst : AddCommGroup M] →
    {ι : Type u_4} →
      [DecidableEq ι] →
        [Fintype ι] →
          {A : Type u_5} → [inst_3 : CommRing A] → [inst_4 : Module A M] → Trunc (Module.Basis ι A M) → (M →ₗ[A] M) →* A

The determinant of an endomorphism given a basis.

See LinearMap.det for a version that populates the basis non-computably.

Although the Trunc (Basis ι A M) parameter makes it slightly more convenient to switch bases, there is no good way to generalize over universe parameters, so we can't fully state in detAux's type that it does not depend on the choice of basis. Instead you can use the detAux_def'' lemma, or avoid mentioning a basis at all using LinearMap.det.

theorem LinearMap.detAux_def' E2 #

∀ {M : Type u_2} [inst : AddCommGroup M] {ι : Type u_4} [inst_1 : DecidableEq ι] [inst_2 : Fintype ι] {A : Type u_5}
  [inst_3 : CommRing A] [inst_4 : Module A M] (b : Module.Basis ι A M) (f : M →ₗ[A] M),
  (LinearMap.detAux (Trunc.mk b)) f = ((LinearMap.toMatrix b b) f).det

Unfold lemma for detAux.

See also detAux_def'' which allows you to vary the basis.

theorem LinearMap.detAux_def'' E1 #

∀ {M : Type u_2} [inst : AddCommGroup M] {ι : Type u_4} [inst_1 : DecidableEq ι] [inst_2 : Fintype ι] {A : Type u_5}
  [inst_3 : CommRing A] [inst_4 : Module A M] {ι' : Type u_7} [inst_5 : Fintype ι'] [inst_6 : DecidableEq ι']
  (tb : Trunc (Module.Basis ι A M)) (b' : Module.Basis ι' A M) (f : M →ₗ[A] M),
  (LinearMap.detAux tb) f = ((LinearMap.toMatrix b' b') f).det

theorem LinearMap.detAux_id E0 #

∀ {M : Type u_2} [inst : AddCommGroup M] {ι : Type u_4} [inst_1 : DecidableEq ι] [inst_2 : Fintype ι] {A : Type u_5}
  [inst_3 : CommRing A] [inst_4 : Module A M] (b : Trunc (Module.Basis ι A M)), (LinearMap.detAux b) LinearMap.id = 1

theorem LinearMap.detAux_comp E0 #

∀ {M : Type u_2} [inst : AddCommGroup M] {ι : Type u_4} [inst_1 : DecidableEq ι] [inst_2 : Fintype ι] {A : Type u_5}
  [inst_3 : CommRing A] [inst_4 : Module A M] (b : Trunc (Module.Basis ι A M)) (f g : M →ₗ[A] M),
  (LinearMap.detAux b) (f ∘ₗ g) = (LinearMap.detAux b) f * (LinearMap.detAux b) g

def LinearMap.det E3 #

{M : Type u_2} →
  [inst : AddCommGroup M] → {A : Type u_5} → [inst_1 : CommRing A] → [inst_2 : Module A M] → (M →ₗ[A] M) →* A

The determinant of an endomorphism independent of basis.

If there is no finite basis on M, the result is 1 instead.

theorem LinearMap.det_def E0 #

∀ {M : Type u_2} [inst : AddCommGroup M] {A : Type u_5} [inst_1 : CommRing A] [inst_2 : Module A M],
  LinearMap.det = if H : ∃ s, Nonempty (Module.Basis (↥s) A M) then LinearMap.detAux (Trunc.mk ⋯.some) else 1

theorem LinearMap.coe_det E0 #

∀ {M : Type u_2} [inst : AddCommGroup M] {A : Type u_5} [inst_1 : CommRing A] [inst_2 : Module A M]
  [inst_3 : DecidableEq M],
  ⇑LinearMap.det = ⇑(if H : ∃ s, Nonempty (Module.Basis (↥s) A M) then LinearMap.detAux (Trunc.mk ⋯.some) else 1)

theorem Module.Free.of_det_ne_one E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {f : M →ₗ[R] M},
  LinearMap.det f ≠ 1 → Module.Free R M

theorem LinearMap.det_eq_det_toMatrix_of_finset E1 #

∀ {M : Type u_2} [inst : AddCommGroup M] {A : Type u_5} [inst_1 : CommRing A] [inst_2 : Module A M]
  [inst_3 : DecidableEq M] {s : Finset M} (b : Module.Basis (↥s) A M) (f : M →ₗ[A] M),
  LinearMap.det f = ((LinearMap.toMatrix b b) f).det

theorem LinearMap.det_toMatrix E0 #

∀ {M : Type u_2} [inst : AddCommGroup M] {ι : Type u_4} [inst_1 : DecidableEq ι] [inst_2 : Fintype ι] {A : Type u_5}
  [inst_3 : CommRing A] [inst_4 : Module A M] (b : Module.Basis ι A M) (f : M →ₗ[A] M),
  ((LinearMap.toMatrix b b) f).det = LinearMap.det f

theorem LinearMap.det_toMatrix' E0 #

∀ {A : Type u_5} [inst : CommRing A] {ι : Type u_7} [inst_1 : Fintype ι] [inst_2 : DecidableEq ι]
  (f : (ι → A) →ₗ[A] ι → A), (LinearMap.toMatrix' f).det = LinearMap.det f

theorem LinearMap.det_toLin E0 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {ι : Type u_4}
  [inst_3 : DecidableEq ι] [inst_4 : Fintype ι] (b : Module.Basis ι R M) (f : Matrix ι ι R),
  LinearMap.det ((Matrix.toLin b b) f) = f.det

theorem LinearMap.det_toLin' E0 #

∀ {R : Type u_1} [inst : CommRing R] {ι : Type u_4} [inst_1 : DecidableEq ι] [inst_2 : Fintype ι] (f : Matrix ι ι R),
  LinearMap.det (Matrix.toLin' f) = f.det

theorem LinearMap.det_cases E1 #

∀ {M : Type u_2} [inst : AddCommGroup M] {A : Type u_5} [inst_1 : CommRing A] [inst_2 : Module A M]
  [inst_3 : DecidableEq M] {P : A → Prop} (f : M →ₗ[A] M),
  (∀ (s : Finset M) (b : Module.Basis (↥s) A M), P ((LinearMap.toMatrix b b) f).det) → P 1 → P (LinearMap.det f)

To show P (LinearMap.det f) it suffices to consider P (Matrix.det (toMatrix _ _ f)) and P 1.

theorem LinearMap.det_comp E0 #

∀ {M : Type u_2} [inst : AddCommGroup M] {A : Type u_5} [inst_1 : CommRing A] [inst_2 : Module A M] (f g : M →ₗ[A] M),
  LinearMap.det (f ∘ₗ g) = LinearMap.det f * LinearMap.det g

theorem LinearMap.det_id E0 #

∀ {M : Type u_2} [inst : AddCommGroup M] {A : Type u_5} [inst_1 : CommRing A] [inst_2 : Module A M],
  LinearMap.det LinearMap.id = 1

theorem LinearMap.det_smul E0 #

∀ {M : Type u_2} [inst : AddCommGroup M] {A : Type u_5} [inst_1 : CommRing A] [inst_2 : Module A M] [Module.Free A M]
  (c : A) (f : M →ₗ[A] M), LinearMap.det (c • f) = c ^ Module.finrank A M * LinearMap.det f

Multiplying a map by a scalar c multiplies its determinant by c ^ dim M.

theorem LinearMap.det_zero' E1 #

∀ {M : Type u_2} [inst : AddCommGroup M] {A : Type u_5} [inst_1 : CommRing A] [inst_2 : Module A M] {ι : Type u_7}
  [Finite ι] [Nonempty ι] (b : Module.Basis ι A M), LinearMap.det 0 = 0

theorem LinearMap.det_zero E0 #

∀ {M : Type u_2} [inst : AddCommGroup M] {A : Type u_5} [inst_1 : CommRing A] [inst_2 : Module A M] [Module.Free A M],
  LinearMap.det 0 = 0 ^ Module.finrank A M

In a finite-dimensional vector space, the zero map has determinant 1 in dimension 0, and 0 otherwise. We give a formula that also works in infinite dimension, where we define the determinant to be 1.

theorem LinearMap.det_eq_one_of_not_module_finite E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M],
  ¬Module.Finite R M → ∀ (f : M →ₗ[R] M), LinearMap.det f = 1

theorem LinearMap.det_eq_one_of_subsingleton E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] [Subsingleton M]
  (f : M →ₗ[R] M), LinearMap.det f = 1

theorem LinearMap.det_eq_one_of_finrank_eq_zero E1 #

∀ {𝕜 : Type u_7} [inst : Field 𝕜] {M : Type u_8} [inst_1 : AddCommGroup M] [inst_2 : Module 𝕜 M],
  Module.finrank 𝕜 M = 0 → ∀ (f : M →ₗ[𝕜] M), LinearMap.det f = 1

theorem LinearMap.det_conj E0 #

∀ {M : Type u_2} [inst : AddCommGroup M] {A : Type u_5} [inst_1 : CommRing A] [inst_2 : Module A M] {N : Type u_7}
  [inst_3 : AddCommGroup N] [inst_4 : Module A N] (f : M →ₗ[A] M) (e : M ≃ₗ[A] N),
  LinearMap.det (↑e ∘ₗ f ∘ₗ ↑e.symm) = LinearMap.det f

Conjugating a linear map by a linear equiv does not change its determinant.

theorem LinearMap.isUnit_det E1 #

∀ {M : Type u_2} [inst : AddCommGroup M] {A : Type u_7} [inst_1 : CommRing A] [inst_2 : Module A M] (f : M →ₗ[A] M),
  IsUnit f → IsUnit (LinearMap.det f)

If a linear map is invertible, so is its determinant.

theorem LinearMap.isUnit_iff_isUnit_det E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] [Module.Finite R M]
  [Module.Free R M] (f : M →ₗ[R] M), IsUnit f ↔ IsUnit (LinearMap.det f)

theorem LinearMap.free_of_det_ne_one E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {f : M →ₗ[R] M},
  LinearMap.det f ≠ 1 → Module.Free R M

If a linear map has determinant different from 1, then the module is free.

theorem LinearMap.finite_of_det_ne_one E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {f : M →ₗ[R] M},
  LinearMap.det f ≠ 1 → Module.Finite R M

If a linear map has determinant different from 1, then the space is finite-dimensional.

theorem LinearMap.bot_lt_ker_of_det_eq_zero E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] [IsDomain R]
  [Module.Free R M] {f : M →ₗ[R] M}, LinearMap.det f = 0 → ⊥ < f.ker

If the determinant of a map vanishes, then the map is not injective.

theorem LinearMap.det_eq_zero_iff_ker_ne_bot E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] [IsDomain R]
  [Module.Free R M] [Module.Finite R M] {f : M →ₗ[R] M}, LinearMap.det f = 0 ↔ f.ker ≠ ⊥

The determinant of a map vanishes iff the map is not injective.

theorem LinearMap.range_lt_top_of_det_eq_zero E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] [IsDomain R]
  [Module.Free R M] {f : M →ₗ[R] M}, LinearMap.det f = 0 → f.range < ⊤

If the determinant of a map vanishes, then the map is not onto.

theorem LinearMap.det_ring E0 #

∀ {R : Type u_1} [inst : CommRing R] (f : R →ₗ[R] R), LinearMap.det f = f 1

When the function is over the base ring, the determinant is the evaluation at 1.

theorem LinearMap.det_mulLeft E1 #

∀ {R : Type u_1} [inst : CommRing R] (a : R), LinearMap.det (LinearMap.mulLeft R a) = a

theorem LinearMap.det_mulRight E1 #

∀ {R : Type u_1} [inst : CommRing R] (a : R), LinearMap.det (LinearMap.mulRight R a) = a

theorem LinearMap.det_prodMap E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {M' : Type u_3}
  [inst_3 : AddCommGroup M'] [inst_4 : Module R M'] [Module.Free R M] [Module.Free R M'] [Module.Finite R M]
  [Module.Finite R M'] (f : Module.End R M) (f' : Module.End R M'),
  LinearMap.det (LinearMap.prodMap f f') = LinearMap.det f * LinearMap.det f'

theorem LinearMap.det_pi E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {ι : Type u_4}
  [inst_3 : Fintype ι] [Module.Free R M] [Module.Finite R M] (f : ι → M →ₗ[R] M),
  LinearMap.det (LinearMap.pi fun i ↦ f i ∘ₗ LinearMap.proj i) = ∏ i, LinearMap.det (f i)

theorem Algebra.det_lsmul E1 #

∀ {R : Type u_5} {S : Type u_6} [inst : CommRing R] [inst_1 : Ring S] [inst_2 : Algebra R S] [Module.Free R S] (x : R),
  LinearMap.det ((Algebra.lsmul R R S) x) = x ^ Module.finrank R S

def LinearEquiv.det E3 #

{R : Type u_1} →
  [inst : CommRing R] → {M : Type u_2} → [inst_1 : AddCommGroup M] → [inst_2 : Module R M] → (M ≃ₗ[R] M) →* Rˣ

On a LinearEquiv, the domain of LinearMap.det can be promoted to Rˣ.

theorem LinearEquiv.coe_det E0 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] (f : M ≃ₗ[R] M),
  ↑(LinearEquiv.det f) = LinearMap.det ↑f

theorem LinearEquiv.coe_inv_det E0 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] (f : M ≃ₗ[R] M),
  ↑(LinearEquiv.det f)⁻¹ = LinearMap.det ↑f.symm

theorem LinearEquiv.det_refl E0 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M],
  LinearEquiv.det (LinearEquiv.refl R M) = 1

theorem LinearEquiv.det_trans E0 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] (f g : M ≃ₗ[R] M),
  LinearEquiv.det (f ≪≫ₗ g) = LinearEquiv.det g * LinearEquiv.det f

theorem LinearEquiv.det_symm E0 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] (f : M ≃ₗ[R] M),
  LinearEquiv.det f.symm = LinearEquiv.det f⁻¹

theorem LinearEquiv.det_conj E0 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {M' : Type u_3}
  [inst_3 : AddCommGroup M'] [inst_4 : Module R M'] (f : M ≃ₗ[R] M) (e : M ≃ₗ[R] M'),
  LinearEquiv.det (e.symm ≪≫ₗ f ≪≫ₗ e) = LinearEquiv.det f

Conjugating a linear equiv by a linear equiv does not change its determinant.

theorem LinearMap.det_map E0 #

∀ {K : Type u_5} {V : Type u_6} {W : Type u_7} [inst : Field K] [inst_1 : AddCommGroup V] [inst_2 : Module K V]
  [inst_3 : AddCommGroup W] [inst_4 : Module K W] {F : Type u_8}
  [inst_5 : EquivLike F (Module.End K V) (Module.End K W)] [AlgEquivClass F K (Module.End K V) (Module.End K W)] (f : F)
  (x : Module.End K V), LinearMap.det (f x) = LinearMap.det x

theorem Matrix.det_map E0 #

∀ {K : Type u_5} {m : Type u_6} {n : Type u_7} [inst : Field K] [inst_1 : Fintype m] [inst_2 : Fintype n]
  [inst_3 : DecidableEq m] [inst_4 : DecidableEq n] {F : Type u_8} [inst_5 : EquivLike F (Matrix m m K) (Matrix n n K)]
  [AlgEquivClass F K (Matrix m m K) (Matrix n n K)] (f : F) (x : Matrix m m K), (f x).det = x.det

theorem Matrix.det_map' E0 #

∀ {K : Type u_5} {m : Type u_6} {F : Type u_7} [inst : Field K] [inst_1 : Fintype m] [inst_2 : DecidableEq m]
  [inst_3 : FunLike F (Matrix m m K) (Matrix m m K)] [AlgHomClass F K (Matrix m m K) (Matrix m m K)] (f : F)
  (x : Matrix m m K), (f x).det = x.det

theorem LinearEquiv.det_mul_det_symm E0 #

∀ {M : Type u_2} [inst : AddCommGroup M] {A : Type u_5} [inst_1 : CommRing A] [inst_2 : Module A M] (f : M ≃ₗ[A] M),
  LinearMap.det ↑f * LinearMap.det ↑f.symm = 1

The determinants of a LinearEquiv and its inverse multiply to 1.

theorem LinearEquiv.det_symm_mul_det E0 #

∀ {M : Type u_2} [inst : AddCommGroup M] {A : Type u_5} [inst_1 : CommRing A] [inst_2 : Module A M] (f : M ≃ₗ[A] M),
  LinearMap.det ↑f.symm * LinearMap.det ↑f = 1

The determinants of a LinearEquiv and its inverse multiply to 1.

theorem LinearEquiv.isUnit_det E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {M' : Type u_3}
  [inst_3 : AddCommGroup M'] [inst_4 : Module R M'] {ι : Type u_4} [inst_5 : DecidableEq ι] [inst_6 : Fintype ι]
  (f : M ≃ₗ[R] M') (v : Module.Basis ι R M) (v' : Module.Basis ι R M'), IsUnit ((LinearMap.toMatrix v v') ↑f).det

theorem LinearEquiv.isUnit_det' E1 #

∀ {M : Type u_2} [inst : AddCommGroup M] {A : Type u_5} [inst_1 : CommRing A] [inst_2 : Module A M] (f : M ≃ₗ[A] M),
  IsUnit (LinearMap.det ↑f)

Specialization of LinearEquiv.isUnit_det

theorem LinearEquiv.det_coe_symm E1 #

∀ {M : Type u_2} [inst : AddCommGroup M] {𝕜 : Type u_5} [inst_1 : Field 𝕜] [inst_2 : Module 𝕜 M] (f : M ≃ₗ[𝕜] M),
  LinearMap.det ↑f.symm = (LinearMap.det ↑f)⁻¹

The determinant of f.symm is the inverse of that of f when f is a linear equiv.

def LinearEquiv.ofIsUnitDet E1 #

{R : Type u_1} →
  [inst : CommRing R] →
    {M : Type u_2} →
      [inst_1 : AddCommGroup M] →
        [inst_2 : Module R M] →
          {M' : Type u_3} →
            [inst_3 : AddCommGroup M'] →
              [inst_4 : Module R M'] →
                {ι : Type u_4} →
                  [inst_5 : DecidableEq ι] →
                    [inst_6 : Fintype ι] →
                      {f : M →ₗ[R] M'} →
                        {v : Module.Basis ι R M} →
                          {v' : Module.Basis ι R M'} → IsUnit ((LinearMap.toMatrix v v') f).det → M ≃ₗ[R] M'

Builds a linear equivalence from a linear map whose determinant in some bases is a unit.

theorem LinearEquiv.ofIsUnitDet_apply E0 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {M' : Type u_3}
  [inst_3 : AddCommGroup M'] [inst_4 : Module R M'] {ι : Type u_4} [inst_5 : DecidableEq ι] [inst_6 : Fintype ι]
  {f : M →ₗ[R] M'} {v : Module.Basis ι R M} {v' : Module.Basis ι R M'} (h : IsUnit ((LinearMap.toMatrix v v') f).det)
  (a : M), (LinearEquiv.ofIsUnitDet h) a = f a

theorem LinearEquiv.ofIsUnitDet_symm_apply E0 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {M' : Type u_3}
  [inst_3 : AddCommGroup M'] [inst_4 : Module R M'] {ι : Type u_4} [inst_5 : DecidableEq ι] [inst_6 : Fintype ι]
  {f : M →ₗ[R] M'} {v : Module.Basis ι R M} {v' : Module.Basis ι R M'} (h : IsUnit ((LinearMap.toMatrix v v') f).det)
  (a : M'), (LinearEquiv.ofIsUnitDet h).symm a = ((Matrix.toLin v' v) ((LinearMap.toMatrix v v') f)⁻¹) a

theorem LinearEquiv.coe_ofIsUnitDet E0 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {M' : Type u_3}
  [inst_3 : AddCommGroup M'] [inst_4 : Module R M'] {ι : Type u_4} [inst_5 : DecidableEq ι] [inst_6 : Fintype ι]
  {f : M →ₗ[R] M'} {v : Module.Basis ι R M} {v' : Module.Basis ι R M'} (h : IsUnit ((LinearMap.toMatrix v v') f).det),
  ↑(LinearEquiv.ofIsUnitDet h) = f

def LinearMap.equivOfIsUnitDet E1 #

{R : Type u_1} →
  [inst : CommRing R] →
    {M : Type u_2} →
      [inst_1 : AddCommGroup M] →
        [inst_2 : Module R M] →
          [Module.Free R M] → [Module.Finite R M] → {f : M →ₗ[R] M} → IsUnit (LinearMap.det f) → M ≃ₗ[R] M

Builds a linear equivalence from an endomorphism whose determinant is a unit.

theorem LinearMap.equivOfIsUnitDet_apply E0 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M]
  [inst_3 : Module.Free R M] [inst_4 : Module.Finite R M] {f : M →ₗ[R] M} (h : IsUnit (LinearMap.det f)) (x : M),
  (LinearMap.equivOfIsUnitDet h) x = f x

theorem LinearMap.coe_equivOfIsUnitDet E0 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M]
  [inst_3 : Module.Free R M] [inst_4 : Module.Finite R M] {f : M →ₗ[R] M} (h : IsUnit (LinearMap.det f)),
  ↑(LinearMap.equivOfIsUnitDet h) = f

abbrev LinearMap.equivOfDetNeZero E1 #

{𝕜 : Type u_5} →
  [inst : Field 𝕜] →
    {M : Type u_6} →
      [inst_1 : AddCommGroup M] →
        [inst_2 : Module 𝕜 M] → [FiniteDimensional 𝕜 M] → (f : M →ₗ[𝕜] M) → LinearMap.det f ≠ 0 → M ≃ₗ[𝕜] M

Builds a linear equivalence from a linear map on a finite-dimensional vector space whose determinant is nonzero.

theorem LinearMap.associated_det_of_eq_comp E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] (e : M ≃ₗ[R] M)
  (f f' : M →ₗ[R] M), (∀ (x : M), f x = f' (e x)) → Associated (LinearMap.det f) (LinearMap.det f')

theorem LinearMap.associated_det_comp_equiv E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {N : Type u_5}
  [inst_3 : AddCommGroup N] [inst_4 : Module R N] (f : N →ₗ[R] M) (e e' : M ≃ₗ[R] N),
  Associated (LinearMap.det (f ∘ₗ ↑e)) (LinearMap.det (f ∘ₗ ↑e'))

def Module.Basis.det E3 #

{R : Type u_1} →
  [inst : CommRing R] →
    {M : Type u_2} →
      [inst_1 : AddCommGroup M] →
        [inst_2 : Module R M] → {ι : Type u_4} → [DecidableEq ι] → [Fintype ι] → Module.Basis ι R M → M [⋀^ι]→ₗ[R] R

The determinant of a family of vectors with respect to some basis, as an alternating multilinear map.

theorem Module.Basis.det_apply E0 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {ι : Type u_4}
  [inst_3 : DecidableEq ι] [inst_4 : Fintype ι] (e : Module.Basis ι R M) (v : ι → M), e.det v = (e.toMatrix v).det

theorem Module.Basis.det_self E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {ι : Type u_4}
  [inst_3 : DecidableEq ι] [inst_4 : Fintype ι] (e : Module.Basis ι R M), e.det ⇑e = 1

theorem Module.Basis.det_isEmpty E0 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {ι : Type u_4}
  [inst_3 : DecidableEq ι] [inst_4 : Fintype ι] (e : Module.Basis ι R M) [inst_5 : IsEmpty ι],
  e.det = AlternatingMap.constOfIsEmpty R M ι 1

theorem Module.Basis.det_ne_zero E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {ι : Type u_4}
  [inst_3 : DecidableEq ι] [inst_4 : Fintype ι] (e : Module.Basis ι R M) [Nontrivial R], e.det ≠ 0

Basis.det is not the zero map.

theorem Module.Basis.smul_det E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {ι : Type u_4}
  [inst_3 : DecidableEq ι] [inst_4 : Fintype ι] (e : Module.Basis ι R M) {G : Type u_5} [inst_5 : Group G]
  [inst_6 : DistribMulAction G M] [inst_7 : SMulCommClass G R M] (g : G) (v : ι → M), (g • e).det v = e.det (g⁻¹ • v)

theorem Module.Basis.is_basis_iff_det E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {ι : Type u_4}
  [inst_3 : DecidableEq ι] [inst_4 : Fintype ι] (e : Module.Basis ι R M) {v : ι → M},
  LinearIndependent R v ∧ Submodule.span R (Set.range v) = ⊤ ↔ IsUnit (e.det v)

theorem Module.Basis.isUnit_det E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {ι : Type u_4}
  [inst_3 : DecidableEq ι] [inst_4 : Fintype ι] (e e' : Module.Basis ι R M), IsUnit (e.det ⇑e')

theorem AlternatingMap.map_basis_eq_zero_iff E0 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {ι : Type u_5}
  [Finite ι] (e : Module.Basis ι R M) (f : M [⋀^ι]→ₗ[R] R), f ⇑e = 0 ↔ f = 0

theorem AlternatingMap.map_basis_ne_zero_iff E0 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {ι : Type u_5}
  [Finite ι] (e : Module.Basis ι R M) (f : M [⋀^ι]→ₗ[R] R), f ⇑e ≠ 0 ↔ f ≠ 0

theorem Module.Basis.det_comp E0 #

∀ {M : Type u_2} [inst : AddCommGroup M] {ι : Type u_4} [inst_1 : DecidableEq ι] [inst_2 : Fintype ι] {A : Type u_5}
  [inst_3 : CommRing A] [inst_4 : Module A M] (e : Module.Basis ι A M) (f : M →ₗ[A] M) (v : ι → M),
  e.det (⇑f ∘ v) = LinearMap.det f * e.det v

theorem Module.Basis.det_comp_basis E0 #

∀ {M : Type u_2} [inst : AddCommGroup M] {M' : Type u_3} [inst_1 : AddCommGroup M'] {ι : Type u_4}
  [inst_2 : DecidableEq ι] [inst_3 : Fintype ι] {A : Type u_5} [inst_4 : CommRing A] [inst_5 : Module A M]
  [inst_6 : Module A M'] (b : Module.Basis ι A M) (b' : Module.Basis ι A M') (f : M →ₗ[A] M'),
  b'.det (⇑f ∘ ⇑b) = LinearMap.det (f ∘ₗ ↑(b'.equiv b (Equiv.refl ι)))

theorem Module.Basis.det_basis E0 #

∀ {M : Type u_2} [inst : AddCommGroup M] {ι : Type u_4} [inst_1 : DecidableEq ι] [inst_2 : Fintype ι] {A : Type u_5}
  [inst_3 : CommRing A] [inst_4 : Module A M] (b b' : Module.Basis ι A M),
  LinearMap.det ↑(b'.equiv b (Equiv.refl ι)) = b'.det ⇑b

theorem Module.Basis.det_mul_det E1 #

∀ {M : Type u_2} [inst : AddCommGroup M] {ι : Type u_4} [inst_1 : DecidableEq ι] [inst_2 : Fintype ι] {A : Type u_5}
  [inst_3 : CommRing A] [inst_4 : Module A M] (b b' b'' : Module.Basis ι A M), b.det ⇑b' * b'.det ⇑b'' = b.det ⇑b''

theorem Module.Basis.det_inv E1 #

∀ {M : Type u_2} [inst : AddCommGroup M] {ι : Type u_4} [inst_1 : DecidableEq ι] [inst_2 : Fintype ι] {A : Type u_5}
  [inst_3 : CommRing A] [inst_4 : Module A M] (b b' : Module.Basis ι A M), ↑⋯.unit⁻¹ = b'.det ⇑b

theorem Module.Basis.det_reindex E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {ι : Type u_4}
  [inst_3 : DecidableEq ι] [inst_4 : Fintype ι] {ι' : Type u_6} [inst_5 : Fintype ι'] [inst_6 : DecidableEq ι']
  (b : Module.Basis ι R M) (v : ι' → M) (e : ι ≃ ι'), (b.reindex e).det v = b.det (v ∘ ⇑e)

theorem Module.Basis.det_reindex' E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {ι : Type u_4}
  [inst_3 : DecidableEq ι] [inst_4 : Fintype ι] {ι' : Type u_6} [inst_5 : Fintype ι'] [inst_6 : DecidableEq ι']
  (b : Module.Basis ι R M) (e : ι ≃ ι'), (b.reindex e).det = AlternatingMap.domDomCongr e b.det

theorem Module.Basis.det_reindex_symm E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {ι : Type u_4}
  [inst_3 : DecidableEq ι] [inst_4 : Fintype ι] {ι' : Type u_6} [inst_5 : Fintype ι'] [inst_6 : DecidableEq ι']
  (b : Module.Basis ι R M) (v : ι → M) (e : ι' ≃ ι), (b.reindex e.symm).det (v ∘ ⇑e) = b.det v

theorem Module.Basis.det_map E0 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {M' : Type u_3}
  [inst_3 : AddCommGroup M'] [inst_4 : Module R M'] {ι : Type u_4} [inst_5 : DecidableEq ι] [inst_6 : Fintype ι]
  (b : Module.Basis ι R M) (f : M ≃ₗ[R] M') (v : ι → M'), (b.map f).det v = b.det (⇑f.symm ∘ v)

theorem Module.Basis.det_map' E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {M' : Type u_3}
  [inst_3 : AddCommGroup M'] [inst_4 : Module R M'] {ι : Type u_4} [inst_5 : DecidableEq ι] [inst_6 : Fintype ι]
  (b : Module.Basis ι R M) (f : M ≃ₗ[R] M'), (b.map f).det = b.det.compLinearMap ↑f.symm

theorem Pi.basisFun_det E0 #

∀ {R : Type u_1} [inst : CommRing R] {ι : Type u_4} [inst_1 : DecidableEq ι] [inst_2 : Fintype ι],
  (Pi.basisFun R ι).det = Matrix.detRowAlternating

theorem Pi.basisFun_det_apply E0 #

∀ {R : Type u_1} [inst : CommRing R] {ι : Type u_4} [inst_1 : DecidableEq ι] [inst_2 : Fintype ι] (v : ι → ι → R),
  (Pi.basisFun R ι).det v = (Matrix.of v).det

theorem Module.Basis.det_smul_mk_coord_eq_det_update E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {ι : Type u_4}
  [inst_3 : DecidableEq ι] [inst_4 : Fintype ι] (e : Module.Basis ι R M) {v : ι → M} (hli : LinearIndependent R v)
  (hsp : ⊤ ≤ Submodule.span R (Set.range v)) (i : ι),
  e.det v • (Module.Basis.mk hli hsp).coord i = (↑e.det).toLinearMap v i

If we fix a background basis e, then for any other basis v, we can characterise the coordinates provided by v in terms of determinants relative to e.

theorem Module.Basis.det_unitsSMul E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {ι : Type u_4}
  [inst_3 : DecidableEq ι] [inst_4 : Fintype ι] (e : Module.Basis ι R M) (w : ι → Rˣ),
  (e.unitsSMul w).det = ↑(∏ i, w i)⁻¹ • e.det

If a basis is multiplied columnwise by scalars w : ι → Rˣ, then the determinant with respect to this basis is multiplied by the product of the inverse of these scalars.

theorem Module.Basis.det_unitsSMul_self E0 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {ι : Type u_4}
  [inst_3 : DecidableEq ι] [inst_4 : Fintype ι] (e : Module.Basis ι R M) (w : ι → Rˣ),
  e.det ⇑(e.unitsSMul w) = ∏ i, ↑(w i)

The determinant of a basis constructed by unitsSMul is the product of the given units.

theorem Module.Basis.det_isUnitSMul E0 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {ι : Type u_4}
  [inst_3 : DecidableEq ι] [inst_4 : Fintype ι] (e : Module.Basis ι R M) {w : ι → R} (hw : ∀ (i : ι), IsUnit (w i)),
  e.det ⇑(e.isUnitSMul hw) = ∏ i, w i

The determinant of a basis constructed by isUnitSMul is the product of the given units.

theorem LinearMap.det_dualMap E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Type u_2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] [Module.Free R M]
  [Module.Finite R M] (f : M →ₗ[R] M), LinearMap.det f.dualMap = LinearMap.det f

The determinant of the transpose of an endomorphism coincides with its determinant.

theorem LinearMap.det_eq_det_mul_det E1 #

∀ {R : Type u_6} {V : Type u_7} [inst : CommRing R] [inst_1 : AddCommGroup V] [inst_2 : Module R V] [Module.Finite R V]
  (W : Submodule R V) [Module.Free R ↥W] [Module.Finite R ↥W] [Module.Free R (V ⧸ W)] (e : V →ₗ[R] V)
  (he : W ≤ Submodule.comap e W), LinearMap.det e = LinearMap.det (e.restrict he) * LinearMap.det (W.mapQ W e he)