nyuuzyou/wikis huggingface dataset:
Mass of Sun from Universal Gravitational Constant

== Theorem ==
Let the universal gravitational constant be known.
Let the mean distance from the Earth to the sun be known.
Then it is possible to calculate the mass of the sun.
== Proof ==
From Kepler's Third Law of Planetary Motion:
:$T^2 = \paren {\dfrac {4 \pi^2} {G M} } a^3$
where:
:$T$ is the orbital period of the planet in question (in this case, the Earth)
:$a$ is the distance from the planet (in this case, the Earth) to the sun
:$M$ is the mass of the sun
:$G$ is the universal gravitational constant
In MKS units:
:$T = 60 \times 60 \times 24 \times 365.24219 \, \mathrm s$ by definition of year
:$a = 149 \, 597 \, 870 \, 700 \, \mathrm m$ by definition of astronomical unit
:$G = 6.674 \times 10^{-11} \, \mathrm N \, \mathrm m^2 \, \mathrm{kg}^{-2}$ by measurement, as .
:$M$ will be the result in kilograms.
Thus:
The calculation has been left as an exercise for anyone who has the patience.
== Sources ==
* : Chapter $\text {B}.25$: Kepler's Laws and Newton's Law of Gravitation: Problem $1$
Category:Universal Gravitational Constant
Category:Celestial Mechanics
Master Code forms Vector Space

== Theorem ==
Let $\map V {n, p}$ be a master code of length $n$ modulo $p$.
Then $\map V {n, p}$ forms a vector space over $\Z_p$ of $n$ dimensions.
== Proof ==
Recall the vector space axioms:
First, the set of sequences $\tuple {x_1, x_2, \ldots, x_n}$, for $x_1, x_2, \ldots, x_n \in \Z_p$, has to be shown to fulfil the abelian group axioms.
This follows from:
:Integers Modulo m under Addition form Cyclic Group
and:
:Cyclic Group is Abelian.
== Sources ==
* : Chapter $6$: Error-correcting codes
Category:Linear Codes
Matching Pennies is Completely Mixed Game

== Theorem ==
The game of matching pennies is a completely mixed game.
== Proof ==
The optimum strategy for matching pennies, for both players, is to randomise both their pure strategies.
Hence the result by definition of completely mixed game.
== Sources ==
* : Chapter $\text{I}$: An Outline of the Theory of Games: $3$
Category:Examples of Two-Person Zero-Sum Games
Matching Pennies is Strictly Competitive

== Theorem ==
The game of Matching Pennies is strictly competitive.
== Proof ==
By definition, a strictly competitive game is a game in which the interests of each player are diametrically opposed.
Recall the payoff table of Matching Pennies:
It can be seen by inspection that exchanging $\text A$ and $\text B$ results in exactly the same entries in the payoff table.
From the nature of a payoff table it follows that the fortunes of each player are opposite and equal.
Hence the result.
== Sources ==
* : $\text I$ Strategic Games: Chapter $2$ Nash Equilibrium: $2.3$: Examples: Example $17.1$
Category:Examples of Two-Person Games
Matrix/Examples/1x1 Matrix

== Example of Matrix ==
A matrix of order $1 \times 1$ is a single element:
:$\mathbf B := \begin {bmatrix} b \end {bmatrix}$
Such a matrix can be identified with a scalar, that is: an element of the underlying set
== Sources ==
* : Chapter $\text I$: Definitions and Fundamental Operations of Matrices: $4$. Matrices, Row Vectors, Column Vectors, Scalars
Category:Examples of Matrices
Matrix/Examples/Example 3x4 Matrix

== Example of Matrix ==
An example of a matrix of order $3 \times 4$ is:
:$\mathbf A := \begin {bmatrix} 1 & 0 & -3 & 1 \\ 2 & 1 & 3 & 1 \\ 1 & 0 & 1 & 1 \end {bmatrix}$
Row $2$ of $\mathbf A$ is $\begin {bmatrix} 2 & 1 & 3 & 1 \end {bmatrix}$.
Column $3$ of $\mathbf A$ is $\begin {bmatrix} -3 \\ 3 \\ 1 \end {bmatrix}$.
== Sources ==
* : Chapter $1$: Linear Equations and Matrices: $1.2$ Elementary Row Operations on Matrices
Category:Examples of Matrices
Matrix Entrywise Addition/Examples/Arbitrary Matrices 1

== Example of Matrix Entrywise Addition ==
Let $\mathbf A = \begin {pmatrix} 3 & -4 & 2 \\ -1 & 0 & 5 \end {pmatrix}$ and $\mathbf B = \begin {pmatrix} 2 & 6 & -1 \\ 4 & -3 & 2 \end {pmatrix}$ be order $2$ square matrices over the real numbers.
Then the matrix sum of $\mathbf A$ and $\mathbf B$ is given by:
:$\mathbf A + \mathbf B = \begin {pmatrix} 5 & 2 & 1 \\ 3 & -3 & 7 \end {pmatrix}$
== Sources ==
* : Chapter $\text I$: Definitions and Fundamental Operations of Matrices: $5$. The Operations of Matrix Algebra
Category:Examples of Matrix Entrywise Addition
Matrix Entrywise Addition/Examples/Real 2 x 2

== Example of Matrix Entrywise Addition ==
Let $\mathbf A = \begin {pmatrix} p & q \\ r & s \end {pmatrix}$ and $\mathbf B = \begin {pmatrix} w & x \\ y & z \end {pmatrix}$ be order $2$ square matrices over the real numbers.
Then the matrix sum of $\mathbf A$ and $\mathbf B$ is given by:
:$\mathbf A + \mathbf B = \begin {pmatrix} p + w & q + x \\ r + y & s + z \end {pmatrix}$
== Sources ==
* : Chapter $1$: Integral Domains: $\S 3$. Definition of an Integral Domain: Example $3$
* 
* 
Category:Examples of Matrix Entrywise Addition
Matrix Entrywise Addition forms Abelian Group

== Theorem ==
Let $\struct {R, +, \circ}$ be a ring whose zero is $0_R$.
Let $\map {\MM_R} {m, n}$ be a $m \times n$ matrix space over $\struct {R, +, \circ}$.
Then $\struct {\map {\MM_R} {m, n}, +}$, where $+$ is matrix entrywise addition, is a group.
== Proof ==
We have by definition that matrix entrywise addition is a specific instance of a Hadamard product.
By definition of a ring, the structure $\struct {R, +}$ is a group.
As $\struct {R, +}$ is a fortiori a monoid, it follows from Matrix Space Semigroup under Hadamard Product that $\struct {\map {\MM_R} {m, n}, +}$ is also a monoid.
As $\struct {R, +}$ is a group, it follows from Negative Matrix is Inverse for Matrix Entrywise Addition that all elements of $\struct {\map {\MM_R} {m, n}, +}$ have an inverse element.
From Matrix Entrywise Addition is Commutative it follows that $\struct {\map {\MM_R} {m, n}, +}$ is an Abelian group.
The result follows.
== Examples ==
== Also see ==
* Hadamard Product over Group forms Group
Category:Matrix Entrywise Addition
Category:Examples of Groups
Category:Matrix Entrywise Addition forms Abelian Group
Matrix Entrywise Addition forms Abelian Group/Examples/2x2 Matrices over Rational Numbers

== Example of Matrix Entrywise Addition forms Abelian Group ==
Let $\Q^{2 \times 2}$ denote the set of order $2$ square matrices over the set $\Q$ of rational numbers.
Then the algebraic structure $\struct {\Q^{2 \times 2}, +}$, where $+$ denotes matrix entrywise addition, is an abelian group.
== Proof ==
From Rational Numbers under Addition form Infinite Abelian Group, $\struct {\Q, +}$ is an abelian group.
It follows from Matrix Entrywise Addition forms Abelian Group that $\struct {\Q^{2 \times 2}, +}$ is an abelian group.
== Sources ==
* : Chapter $2$: The Definition of Group Structure: $\S 29 \alpha \ (4)$
Category:Examples of Matrix Entrywise Addition
Category:Matrix Entrywise Addition forms Abelian Group
Matrix Entrywise Addition forms Abelian Group/Examples/nxn Matrices over Real Numbers

== Example of Matrix Entrywise Addition forms Abelian Group ==
Let $\R^{n \times n}$ denote the set of order $n$ square matrices over the set $\R$ of real numbers.
Then the algebraic structure $\struct {\R^{n \times n}, +}$, where $+$ denotes matrix entrywise addition, is an abelian group.
== Proof ==
From Real Numbers under Addition form Infinite Abelian Group, $\struct {\R, +}$ is an abelian group.
It follows from Matrix Entrywise Addition forms Abelian Group that $\struct {\R^{n \times n}, +}$ is an abelian group.
== Sources ==
* : Chapter $1$: Definitions and Examples: Example $1.7$
Category:Examples of Matrix Entrywise Addition
Category:Matrix Entrywise Addition forms Abelian Group
Matrix Entrywise Addition is Associative

== Theorem ==
Let $\map \MM {m, n}$ be a $m \times n$ matrix space over one of the standard number systems.
For $\mathbf A, \mathbf B \in \map \MM {m, n}$, let $\mathbf A + \mathbf B$ be defined as the matrix entrywise sum of $\mathbf A$ and $\mathbf B$.
The operation $+$ is associative on $\map \MM {m, n}$.
That is:
:$\paren {\mathbf A + \mathbf B} + \mathbf C = \mathbf A + \paren {\mathbf B + \mathbf C}$
for all $\mathbf A$, $\mathbf B$ and $\mathbf C$ in $\map \MM {m, n}$.
== Proof 1 ==
== Proof 2 ==
== Also see ==
* Matrix Entrywise Addition is Commutative
== Sources ==
* : Part $\text I$: Matrices and vector spaces: $1$ Matrices: $1.2$ Addition and multiplication of matrices: $1$
* 
* 
Category:Matrix Entrywise Addition is Associative
Category:Matrix Entrywise Addition
Category:Examples of Associative Operations‎
Matrix Entrywise Addition is Associative/Proof 1

== Theorem ==
== Proof ==
From:
:Integers form Ring
:Rational Numbers form Ring
:Real Numbers form Ring
:Complex Numbers form Ring
the standard number systems $\Z$, $\Q$, $\R$ and $\C$ are rings.
Hence we can apply Matrix Entrywise Addition over Ring is Associative.
The above cannot be applied to the natural numbers $\N$, as they do not form a ring.
However, from Natural Numbers under Addition form Commutative Monoid, the algebraic structure $\struct {\N, +}$ is a commutative monoid.
By definition, matrix entrywise addition is the Hadamard product with respect to addition of numbers.
The result follows from Associativity of Hadamard Product.
Category:Matrix Entrywise Addition is Associative
Matrix Entrywise Addition is Associative/Proof 2

== Theorem ==
== Proof ==
Let $\mathbf A = \sqbrk a_{m n}$, $\mathbf B = \sqbrk b_{m n}$ and $\mathbf C = \sqbrk c_{m n}$ be matrices whose order is $m \times n$.
Then:
Category:Matrix Entrywise Addition is Associative
Matrix Entrywise Addition is Commutative

== Theorem ==
Let $\map \MM {m, n}$ be a $m \times n$ matrix space over one of the standard number systems.
For $\mathbf A, \mathbf B \in \map \MM {m, n}$, let $\mathbf A + \mathbf B$ be defined as the matrix entrywise sum of $\mathbf A$ and $\mathbf B$.
The operation $+$ is commutative on $\map \MM {m, n}$.
That is:
:$\mathbf A + \mathbf B = \mathbf B + \mathbf A$
for all $\mathbf A$ and $\mathbf B$ in $\map \MM {m, n}$.
== Proof 1 ==
== Proof 2 ==
== Also see ==
* Matrix Entrywise Addition is Associative
== Sources ==
* : Part $\text I$: Matrices and vector spaces: $1$ Matrices: $1.2$ Addition and multiplication of matrices: $2$
* 
* 
Category:Matrix Entrywise Addition is Commutative
Category:Matrix Entrywise Addition
Category:Examples of Commutative Operations
Matrix Entrywise Addition is Commutative/Proof 1

== Theorem ==
== Proof ==
From:
:Integers form Ring
:Rational Numbers form Ring
:Real Numbers form Ring
:Complex Numbers form Ring
the standard number systems $\Z$, $\Q$, $\R$ and $\C$ are rings.
Hence we can apply Matrix Entrywise Addition over Ring is Commutative.
The above cannot be applied to the natural numbers $\N$, as they do not form a ring.
However, from Natural Numbers under Addition form Commutative Monoid, the algebraic structure $\struct {\N, +}$ is a commutative monoid.
By definition, matrix entrywise addition is the Hadamard product with respect to addition of numbers.
The result follows from Commutativity of Hadamard Product.
Category:Matrix Entrywise Addition is Commutative
Matrix Entrywise Addition over Ring is Associative

== Theorem ==
Let $\struct {R, +, \circ}$ be a ring.
Let $\map {\MM_R} {m, n}$ be a $m \times n$ matrix space over $R$.
For $\mathbf A, \mathbf B \in \map {\MM_R} {m, n}$, let $\mathbf A + \mathbf B$ be defined as the matrix entrywise sum of $\mathbf A$ and $\mathbf B$.
The operation $+$ is associative on $\map {\MM_R} {m, n}$.
That is:
:$\paren {\mathbf A + \mathbf B} + \mathbf C = \mathbf A + \paren {\mathbf B + \mathbf C}$
for all $\mathbf A$, $\mathbf B$ and $\mathbf C$ in $\map {\MM_R} {m, n}$.
== Proof 1 ==
== Proof 2 ==
== Also see ==
* Matrix Entrywise Addition over Ring is Commutative
Category:Matrix Entrywise Addition
Category:Examples of Associative Operations‎
Category:Matrix Entrywise Addition is Associative
Matrix Entrywise Addition over Ring is Associative/Proof 1

== Theorem ==
== Proof ==
Let $\mathbf A = \sqbrk a_{m n}$, $\mathbf B = \sqbrk b_{m n}$ and $\mathbf C = \sqbrk c_{m n}$ be elements of the $m \times n$ matrix space over $R$.
Then:
Category:Matrix Entrywise Addition is Associative
Matrix Entrywise Addition over Ring is Associative/Proof 2

== Theorem ==
== Proof ==
By definition, matrix entrywise addition is the Hadamard product of $\mathbf A$ and $\mathbf B$ with respect to ring addition.
We have from that ring addition is associative.
The result then follows directly from Associativity of Hadamard Product.
Category:Matrix Entrywise Addition is Associative
Matrix Entrywise Addition over Ring is Closed

== Theorem ==
Let $\struct {R, +, \circ}$ be a ring.
Let $\map {\MM_R} {m, n}$ be a $m \times n$ matrix space over $R$.
For $\mathbf A, \mathbf B \in \map {\MM_R} {m, n}$, let $\mathbf A + \mathbf B$ be defined as the matrix entrywise sum of $\mathbf A$ and $\mathbf B$.
The operation $+$ is closed on $\map {\MM_R} {m, n}$.
That is:
:$\mathbf A + \mathbf B \in \map {\MM_R} {m, n}$
for all $\mathbf A$ and $\mathbf B$ in $\map {\MM_R} {m, n}$.
</onlyinclude>
== Proof 1 ==
== Proof 2 ==
Category:Matrix Entrywise Addition
Category:Algebraic Closure
Category:Matrix Entrywise Addition is Closed
Matrix Entrywise Addition over Ring is Closed/Proof 1

== Theorem ==
== Proof ==
Let $\mathbf A = \sqbrk a_{m n}$ and $\mathbf B = \sqbrk b_{m n}$ be elements of $\map {\MM_R} {m, n}$.
Let $\sqbrk c_{m n} = \sqbrk a_{m n} + \sqbrk b_{m n}$.
By definition of matrix entrywise addition:
:$\forall i \in \closedint 1 m, j \in \closedint 1 n: a_{i j} + b_{i j} = c_{i j}$
By , $R$ is closed under addition.
Hence:
:$\forall i \in \closedint 1 m, j \in \closedint 1 n: c_{i j} \in R$
From the definition of matrix entrywise addition, $\sqbrk c_{m n}$ has the same order as both $\sqbrk a_{m n}$ and $\sqbrk b_{m n}$.
Thus it follows that:
:$\sqbrk c_{m n} \in \map {\MM_R} {m, n}$
Thus $\struct {\map {\MM_R} {m, n}, +}$, as it is defined, is closed.
Category:Matrix Entrywise Addition is Closed
Matrix Entrywise Addition over Ring is Closed/Proof 2

== Theorem ==
== Proof ==
By definition, matrix entrywise addition is the Hadamard product of $\mathbf A$ and $\mathbf B$ with respect to ring addition.
We have from that ring addition is closed.
The result then follows directly from Closure of Hadamard Product.
Category:Matrix Entrywise Addition is Closed
Matrix Entrywise Addition over Ring is Commutative

== Theorem ==
Let $\struct {R, +, \circ}$ be a ring.
Let $\map {\MM_R} {m, n}$ be a $m \times n$ matrix space over $R$.
For $\mathbf A, \mathbf B \in \map {\MM_R} {m, n}$, let $\mathbf A + \mathbf B$ be defined as the matrix entrywise sum of $\mathbf A$ and $\mathbf B$.
The operation $+$ is commutative on $\map {\MM_R} {m, n}$.
That is:
:$\mathbf A + \mathbf B = \mathbf B + \mathbf A$
for all $\mathbf A$ and $\mathbf B$ in $\map {\MM_R} {m, n}$.
== Proof 1 ==
== Proof 2 ==
== Also see ==
* Matrix Entrywise Addition over Ring is Associative
Category:Matrix Entrywise Addition
Category:Examples of Commutative Operations
Category:Matrix Entrywise Addition is Commutative
Matrix Entrywise Addition over Ring is Commutative/Proof 2

== Theorem ==
== Proof ==
By definition, matrix entrywise addition is the Hadamard product of $\mathbf A$ and $\mathbf B$ with respect to ring addition.
We have from that ring addition is commutative.
The result then follows directly from Commutativity of Hadamard Product.
Category:Matrix Entrywise Addition is Commutative
Matrix Equation of Plane Reflection

== Theorem ==
Let $\LL$ be a straight line through the origin $O$ of a cartesian plane.
Let the angle between $\LL$ and the $x$-axis be $\alpha$.
Let $\phi_\alpha$ denote the reflection in the plane whose axis is $\LL$.
Let $\LL$ reflect an arbitrary point in the plane $P = \tuple {x, y}$ onto $P' = \tuple {x', y'}$.
Then:
:$\begin {bmatrix} x' \\ y' \end {bmatrix} = \begin {bmatrix} \cos 2 \alpha & \sin 2 \alpha \\ \sin 2 \alpha & -\cos 2 \alpha \end {bmatrix} \begin {bmatrix} x \\ y \end {bmatrix}$
== Proof ==
Let the coordinates of $P'$ be encoded as the elements of a $2 \times 1$ matrix.
We have:
Hence the result.
== Also see ==
* Determinant of Plane Reflection Matrix
* Inverse of Plane Reflection Matrix
Category:Geometric Reflections
Category:Equations defining Plane Reflection
Matrix Equation of Plane Rotation

== Theorem ==
Let $r_\alpha$ be a rotation of the plane about the origin through an angle of $\alpha$.
Let $r_\alpha$ rotate an arbitrary point in the plane $P = \tuple {x, y}$ onto $P' = \tuple {x', y'}$
Then the rotation matrix representing $r_\alpha$ can be presented as:
:$\begin {bmatrix} x' \\ y' \end {bmatrix} = \begin {bmatrix} \cos \alpha & -\sin \alpha \\ \sin \alpha & \cos \alpha \end {bmatrix} \begin {bmatrix} x \\ y \end {bmatrix}$
== Proof ==
Let the coordinates of $P'$ be encoded as the elements of a $2 \times 1$ matrix.
We have:
Hence the result.
== Also see ==
* Determinant of Plane Rotation Matrix
* Inverse of Plane Rotation Matrix
Category:Geometric Rotations
Category:Rotation Matrices
Category:Equations defining Plane Rotation
Matrix Equivalence is Equivalence Relation

== Theorem ==
Matrix equivalence is an equivalence relation.
== Proof ==
Checking in turn each of the criteria for equivalence:
=== Reflexive ===
Let $\mathbf A$ be an arbitrary $m \times n$ matrix.
Let $\mathbf {I_m}$ and $\mathbf {I_n}$ denote the unit matrices of order $m$ and $n$ respectively.
From Unit Matrix is its own Inverse, both $\mathbf {I_m}$ and $\mathbf {I_n}$ are nonsingular matrices.
Then we have that Unit Matrix is Identity for Matrix Multiplication.
Hence there exist nonsingular matrices $\mathbf {I_m}, \mathbf {I_n}$ such that:
:$\mathbf A = \mathbf {I_m}^{-1} \mathbf A \mathbf {I_n}$
Thus reflexivity holds.
=== Symmetric ===
Let $\mathbf A$ and $\mathbf B$ be arbitrary $m \times n$ matrices such that $\mathbf A \equiv \mathbf B$.
Then by definition there exist nonsingular matrices $\mathbf P$ and $\mathbf Q$ such that:
:$\mathbf B = \mathbf Q^{-1} \mathbf A \mathbf P$
That is:
:$\mathbf B \equiv \mathbf A$
Thus symmetry holds.
=== Transitive ===
Let $\mathbf A$, $\mathbf B$ and $\mathbf C$ be arbitrary $m \times n$ matrices such that:
:$\mathbf A \equiv \mathbf B$
:$\mathbf B \equiv \mathbf C$
Then by definition there exist nonsingular matrices $\mathbf P_1$, $\mathbf P_2$, $\mathbf Q_1$ and $\mathbf Q_2$ such that:
:$\mathbf B = \mathbf Q_1^{-1} \mathbf A \mathbf P_1$
:$\mathbf C = \mathbf Q_2^{-1} \mathbf B \mathbf P_2$
Then:
By Product of Matrices is Nonsingular iff Matrices are Nonsingular, both $\mathbf Q_1 \mathbf Q_2$ and $\mathbf P_1 \mathbf P_2$ are nonsingular.
Hence, there exist nonsingular matrices $\mathbf Q_1 \mathbf Q_2$ and $\mathbf P_1 \mathbf P_2$, such that:
Hence:
:$\mathbf A \equiv \mathbf C$
Thus transitivity holds.
Hence the result by definition of equivalence relation.
== Sources ==
* : Chapter $\text {V}$: Vector Spaces: $\S 29$. Matrices
Category:Matrix Algebra
Category:Examples of Equivalence Relations
Matrix Exponential of Sum of Commutative Matrices

== Theorem ==
Let $\mathbf A$ and $\mathbf B$ be a square matrices of order $m$ for some $m \in \Z_{\ge 1}$.
Let $t \in \R$ be a real number.
Let $e^{\mathbf A t}$ denote the matrix exponential of $\mathbf A$.
Let $\mathbf A \mathbf B = \mathbf B \mathbf A$.
Then:
:$e^{\mathbf A t} e^{\mathbf B t} = e^{\paren {\mathbf A + \mathbf B} t}$
== Proof ==
Let:
:$\map \Phi t = e^{\mathbf A t} e^{\mathbf B t} - e^{\paren {\mathbf A + \mathbf B} t}$
Category:Matrix Exponential
Category:Commutativity
Matrix Form of Quaternion

== Theorem ==
Let $\mathbf x$ be a quaternion such that:
: $\mathbf x = a \mathbf 1 + b \mathbf i + c \mathbf j + d \mathbf k$
When the quaternion basis is expressed in the form of matrices:
:$\mathbf 1 = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}
\qquad
\mathbf i = \begin{bmatrix} i & 0 \\ 0 & -i \end{bmatrix}
\qquad
\mathbf j = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix}
\qquad
\mathbf k = \begin{bmatrix} 0 & i \\ i & 0 \end{bmatrix}$
the general quaternion $\mathbf x$ has the form:
:$\mathbf x = \begin{bmatrix} a + bi & c + di \\ -c + di & a - bi \end{bmatrix}$
or:
:$\mathbf x = \begin{bmatrix} w & z \\ -\overline z & \overline w \end{bmatrix}$
where :
:$w$ and $z$ are complex numbers
:$\overline z$ is the complex conjugate of $z$.
== Proof ==
== Sources ==
* : Chapter $1$: Rings - Definitions and Examples: $2$: Some examples of rings: Ring Example $9$
* : $\S 55$. Special types of ring and ring elements: $(3)$
Category:Quaternions
Category:Matrix Algebra
Matrix Inverse Algorithm

== Algorithm ==
The matrix inverse algorithm is an algorithm which either:
:$(1): \quad$ converts a matrix into its inverse, if it exists
or:
:$(2): \quad$ determines that such an inverse does not exist.
Let $\mathbf A$ be the $n \times n$ square matrix in question.
Let $\mathbf I$ be the unit matrix of order $n$.
:Step $0$: Create the augmented matrix $\begin {bmatrix} \mathbf A & \mathbf I \end {bmatrix}$.
:Step $1$: Perform elementary row operations until $\begin {bmatrix} \mathbf A & \mathbf I \end {bmatrix}$ is in reduced echelon form.
By Matrix is Row Equivalent to Reduced Echelon Matrix, this is possible.
By Reduced Echelon Matrix is Unique, this process is well-defined.
Call this new augmented matrix $\begin {bmatrix} \mathbf H & \mathbf C \end {bmatrix}$.
:Step $2$: 
::If $\mathbf H = \mathbf I$, then take $\mathbf C = \mathbf A^{-1}$.
::If $\mathbf H \ne \mathbf I$, $\mathbf A$ is singular.
== Proof ==
Suppose $\begin {bmatrix} \mathbf A & \mathbf I \end {bmatrix}$ can be transformed into an upper triangular matrix with no zeroes on its main diagonal.
Then from Identity Matrix from Upper Triangular Matrix, it can further be transformed into $\begin {bmatrix} \mathbf H & \mathbf C \end {bmatrix}$ where $\mathbf H = \mathbf I$.
From Row Operation is Equivalent to Pre-Multiplication by Product of Elementary Matrices, the row operation to convert $\begin {bmatrix} \mathbf A & \mathbf I \end {bmatrix}$ to $\begin {bmatrix} \mathbf H & \mathbf C \end {bmatrix}$ is equivalent to the matrix product of the elementary row matrices corresponding to the sequence of elementary row operations that compose that row operation.
Let $\mathbf R$ be that matrix corresponding to that row operation.
Because $\mathbf H = \mathbf I$, it follows that:
:$\mathbf R \mathbf A = \mathbf I$
and so $\mathbf R$ is the inverse of $\mathbf A$.
That is:
:$\mathbf R = \mathbf A^{-1}$
We also have, from the action of $\mathbf R$ on the of the augmented matrix $\begin {bmatrix} \mathbf A & \mathbf I \end {bmatrix}$ that:
:$\mathbf R \mathbf I = \mathbf C$
and so:
:$\mathbf C = \mathbf R = \mathbf A^{-1}$
Now suppose that $\mathbf H \ne \mathbf I$.
== Examples ==
== Sources ==
* : Part $\text I$: Matrices and vector spaces: $1$ Matrices: $1.5$ Row and column operations
Category:Inverse Matrices
Category:Matrix Inverse Algorithm