Main derivation
S01 · definition
Before
M\in\mathbb{R}^{m\times n}After
M(i,j)\ (1\le i\le m,\ 1\le j\le n);\ (A+B)(i,j)=A(i,j)+B(i,j);\ M^{\mathsf T}(j,i)=M(i,j)Conditions: m,n\ge 1
Rule: mko_matrix_def · Uses: G1
Leaf basis: mko_matrix_def + def_unfold
State the MKO's definition: a matrix is a table of reals indexed by two indices, the first the row and the second the column, both starting at 1. Addition is defined only for matrices of equal dimensions, entry by entry; the transpose Mᵀ is n×m and places M(i,j) at position (j,i).
S02 · implies
Before
M=\begin{pmatrix}2&-1&0\\5&3&7\end{pmatrix},\ N=\begin{pmatrix}1&4&-2\\0&-3&6\end{pmatrix}After
M,N\in\mathbb{R}^{2\times 3}Conditions: none
Rule: mko_matrix_def · Uses: S01, G2
Leaf basis: mko_matrix_def + numeric_evaluation
M has 2 rows, each with 3 entries (rows of equal length, nonempty), so M is 2×3 with 2·3=6 entries; N is likewise 2×3. Dimensions list rows first and columns second, so 2×3 and 3×2 are different dimensions.
S03 · equivalent
Before
M(1,2),\ M(2,3),\ M(2,1)
After
M(1,2)=-1,\ M(2,3)=7,\ M(2,1)=5
Conditions: 1\le i\le 2; 1\le j\le 3
Rule: def_unfold · Uses: S01, S02
Leaf basis: def_unfold + mko_matrix_def
M(1,2) is the 2nd entry of row 1, namely −1; M(2,3) is the 3rd entry of row 2, namely 7; M(2,1) is the 1st entry of row 2, namely 5. M(1,2)≠M(2,1): the order of the two indices matters, row first and column second.
S04 · implies
Before
M(3,1)
After
(3,1)\ \text{is not a legal index of } MConditions: none
Rule: mko_matrix_def · Uses: S01, S02
Leaf basis: mko_matrix_def + order_basics
M has only 2 rows, so the legal row indices are 1≤i≤2. Since 3>2, M(3,1) is undefined; it is neither 0 nor 'the last row'. Before reading an entry both indices must lie in the legal range (MKO second paragraph).
S05 · implies
Before
M,N\in\mathbb{R}^{2\times 3}After
M+N\ \text{defined},\ M+N\in\mathbb{R}^{2\times 3}Conditions: \dim M=\dim N
Rule: mko_matrix_def · Uses: S01, S02
Leaf basis: mko_matrix_def
Check dimensions before adding (MKO assumption a3): M and N are both 2×3, so M+N is defined and is also 2×3.
S06 · equivalent
Before
M+N
After
\begin{pmatrix}2+1&-1+4&0+(-2)\\5+0&3+(-3)&7+6\end{pmatrix}=\begin{pmatrix}3&3&-2\\5&0&13\end{pmatrix}Conditions: none
Rule: mko_matrix_def · Uses: S05, G2
Leaf basis: mko_matrix_def + numeric_evaluation + matrix_eq
Add entry by entry: the two entries at the same position (i,j) are added, at all 6 positions. For example (M+N)(2,3)=7+6=13 and (M+N)(2,2)=3+(−3)=0.
S07 · equivalent
Before
M^{\mathsf T}After
\begin{pmatrix}2&5\\-1&3\\0&7\end{pmatrix}\in\mathbb{R}^{3\times 2}Conditions: none
Rule: mko_matrix_def · Uses: S01, S02, S03
Leaf basis: mko_matrix_def + matrix_eq
Mᵀ is 3×2 with Mᵀ(j,i)=M(i,j): row j of Mᵀ is column j of M. The three columns of M are (2,5), (−1,3), (0,7), so these are the three rows of Mᵀ. Check: Mᵀ(3,2)=M(2,3)=7 and Mᵀ(2,1)=M(1,2)=−1.
S08 · equivalent
Before
N^{\mathsf T}After
\begin{pmatrix}1&0\\4&-3\\-2&6\end{pmatrix}\in\mathbb{R}^{3\times 2}Conditions: none
Rule: mko_matrix_def · Uses: S01, S02, G2
Leaf basis: mko_matrix_def + matrix_eq
Likewise, the three rows of Nᵀ are the three columns (1,0), (4,−3), (−2,6) of N.
S09 · theorem_application
Before
(M+N)^{\mathsf T}After
M^{\mathsf T}+N^{\mathsf T}Conditions: M,N\in\mathbb{R}^{2\times 3}
Rule: L_transpose_sum · Uses: S05, L_transpose_sum
Leaf basis: L_transpose_sum
M and N are both 2×3, so by Lemma L_transpose_sum (A=M, B=N), (M+N)ᵀ=Mᵀ+Nᵀ. The lemma is proved for all real matrices of equal size in S09.1 and S09.2; S10 checks this example numerically.
S10 · implies
Before
(M+N)^{\mathsf T},\ M^{\mathsf T}+N^{\mathsf T}After
\begin{pmatrix}3&5\\3&0\\-2&13\end{pmatrix}=\begin{pmatrix}2+1&5+0\\-1+4&3+(-3)\\0+(-2)&7+6\end{pmatrix}Conditions: none
Rule: numeric_evaluation · Uses: S06, S07, S08, S09
Leaf basis: numeric_evaluation + matrix_eq
Transposing M+N from S06 directly gives the rows (3,5), (3,0), (−2,13); adding S07 and S08 entry by entry gives the same 3×2 matrix. This is a numeric check of the example, consistent with the general result of S09; the general result rests on S09.2, not on this computation.
S11 · theorem_application
Before
(M^{\mathsf T})^{\mathsf T}After
M
Conditions: none
Rule: L_double_transpose · Uses: S07, L_double_transpose
Leaf basis: L_double_transpose
By Lemma L_double_transpose, (Mᵀ)ᵀ=M: transposing the 3×2 matrix of S07 again turns its rows (2,5), (−1,3), (0,7) back into the three columns and returns the original 2×3 matrix M. The lemma is proved in S11.1.
S12 · implies
Before
M+M^{\mathsf T},\ M\in\mathbb{R}^{2\times 3},\ M^{\mathsf T}\in\mathbb{R}^{3\times 2}After
M+M^{\mathsf T}\ \text{undefined}Conditions: 2\neq 3
Rule: mko_matrix_def · Uses: S02, S07, S05
Leaf basis: mko_matrix_def + numeric_evaluation
M is 2×3 and Mᵀ is 3×2; since 2≠3 the dimensions differ, and entrywise addition cannot match every position (for example M(1,3) exists but Mᵀ(1,3) does not), so M+Mᵀ is undefined. Only for a square matrix (m=n) does the transpose keep the dimensions.
S13 · implies
Before
R=\begin{pmatrix}5&3&7\\2&-1&0\end{pmatrix}\ \text{(rows of } M\text{ reversed)}After
R\in\mathbb{R}^{2\times 3},\ M^{\mathsf T}\in\mathbb{R}^{3\times 2}\ \Rightarrow\ R\neq M^{\mathsf T}Conditions: none
Rule: matrix_eq · Uses: S07, G2, matrix_eq
Leaf basis: matrix_eq
Reversing the two rows of M gives R, which is still 2×3, while Mᵀ is 3×2. The dimensions differ, so R≠Mᵀ by matrix_eq. The transpose exchanges the roles of rows and columns; it does not reverse the order of the rows (MKO assumption a3).
S14 · implies
Before
S=\begin{pmatrix}1&2\\3&4\end{pmatrix},\ S^{\mathsf T}=\begin{pmatrix}1&3\\2&4\end{pmatrix}After
SS^{\mathsf T}=\begin{pmatrix}5&11\\11&25\end{pmatrix}\neq IConditions: none
Rule: matrix_product_def · Uses: G3, matrix_product_def, matrix_eq
Leaf basis: matrix_product_def + matrix_eq + numeric_evaluation
If Sᵀ were the inverse of S, SSᵀ would have to be the identity matrix I. By the definition of the matrix product: (SSᵀ)(1,1)=1·1+2·2=5, (SSᵀ)(1,2)=1·3+2·4=11, (SSᵀ)(2,1)=3·1+4·2=11, (SSᵀ)(2,2)=3·3+4·4=25. The top-left entry 5≠1, so SSᵀ≠I and Sᵀ is not the inverse of S. The transpose only moves entries and is defined for every matrix; the inverse is a different notion.
S15 · implies
Before
a[i][j],\ 0\le i\le 1,\ 0\le j\le 2
After
a[i][j]=M(i+1,\,j+1);\ a[1][2]=M(2,3)=7
Conditions: none
Rule: function_def · Uses: G3, S03, function_def
Leaf basis: function_def + numeric_evaluation
The zero-based array stores M row by row, so array position (i,j) corresponds to the external index (i+1, j+1); this is a bijection between the two index ranges. Hence a[1][2] is M(2,3)=7, not M(1,2)=−1. External statements always use one-based indices (MKO assumption a1), and zero-based program indices must have one added before they are matched.
S16 · implies
Before
\text{tasks of the goal}After
M,N\in\mathbb{R}^{2\times 3},\ M^{\mathsf T}\in\mathbb{R}^{3\times 2},\ (M+N)^{\mathsf T}=M^{\mathsf T}+N^{\mathsf T}Conditions: none
Rule: and_intro_elim · Uses: S02, S03, S04, S06, S07, S09, S10, S11, S12, S13, S14, S15
Leaf basis: and_intro_elim
Combine the steps: dimensions 2×3; M(1,2)=−1 and M(2,3)=7, while M(3,1) does not exist; M+N, Mᵀ and Nᵀ as above; (A+B)ᵀ=Aᵀ+Bᵀ and (Aᵀ)ᵀ=A are proved for all real matrices of equal size and checked on the example; M+Mᵀ is undefined; the transpose is neither row reversal nor the inverse; a[1][2]=M(2,3).
Substeps and lemmas
S09.1 · implies
Before
A,B\in\mathbb{R}^{m\times n}After
(A+B)^{\mathsf T},\ A^{\mathsf T}+B^{\mathsf T}\in\mathbb{R}^{n\times m}Conditions: none
Rule: mko_matrix_def · Uses: mko_matrix_def
Leaf basis: mko_matrix_def
A+B is m×n, so (A+B)ᵀ is n×m. Aᵀ and Bᵀ are both n×m, of equal size, so Aᵀ+Bᵀ is defined and is n×m. The two sides have the same dimensions.
S09.2 · implies
Before
(A+B)^{\mathsf T}(j,i)After
(A+B)(i,j)=A(i,j)+B(i,j)=A^{\mathsf T}(j,i)+B^{\mathsf T}(j,i)=(A^{\mathsf T}+B^{\mathsf T})(j,i)Conditions: 1\le j\le n; 1\le i\le m
Rule: matrix_eq · Uses: S09.1, matrix_eq, forall_intro
Leaf basis: matrix_eq + mko_matrix_def + forall_intro + eq_refl_symm_trans
Take an arbitrary legal position (j,i). Applying the definition of transpose, the definition of addition, the definition of transpose again (twice) and the definition of addition gives the chain of equalities. The position is arbitrary with no further assumption, so by forall_intro the equality holds at every position; with equal dimensions from S09.1, matrix_eq gives (A+B)ᵀ=Aᵀ+Bᵀ. S09.1 and S09.2 together prove Lemma L_transpose_sum.
S11.1 · implies
Before
A\in\mathbb{R}^{m\times n}After
(A^{\mathsf T})^{\mathsf T}\in\mathbb{R}^{m\times n},\ (A^{\mathsf T})^{\mathsf T}(i,j)=A^{\mathsf T}(j,i)=A(i,j)Conditions: none
Rule: matrix_eq · Uses: mko_matrix_def, matrix_eq
Leaf basis: matrix_eq + mko_matrix_def + forall_intro
Aᵀ is n×m, so (Aᵀ)ᵀ is m×n, the same size as A. For any legal (i,j), using the definition of transpose twice gives (Aᵀ)ᵀ(i,j)=Aᵀ(j,i)=A(i,j). By matrix_eq, (Aᵀ)ᵀ=A. This proves Lemma L_double_transpose.