/-- An orthogonal matrix has determinant `1` or `-1`.
Hint: take determinants of `Aᵀ * A = 1` using `det_mul`, `det_transpose` and `det_one`, then use
`mul_self_eq_one_iff`. -/
theorem det_orthogonal {n : Type*} [Fintype n] [DecidableEq n] {A : Matrix n n ℝ}
(hA : Aᵀ * A = 1) : A.det = 1 ∨ A.det = -1 := by
sorryShow the compiled solution
/-- **An orthogonal matrix has determinant `1` or `−1`**: `det A ² = det Aᵀ · det A =
det (AᵀA) = det I = 1`. The two values label the two connected components of `O(n)`. -/
theorem det_orthogonal {n : Type*} [Fintype n] [DecidableEq n] {A : Matrix n n ℝ}
(hA : Aᵀ * A = 1) : A.det = 1 ∨ A.det = -1 := by
have h : (Aᵀ * A).det = 1 := by rw [hA, det_one]
rw [det_mul, det_transpose] at h
exact mul_self_eq_one_iff.mp hAxioms used: propext, Classical.choice, Quot.soundformal/Lumenary/MatrixGroups.leanTry it in the Lean web editor