以矩陣的列運算解二階反方陣
Author: 藍邦偉  老師

以矩陣的列運算解二階反方陣：

a=

b=

c=

d=

AA^{-1}=A^{-1}A=I

A=\left [ \begin{array}{} a & b \ c & d \ \end{array}  \right ] 

a=

b=

c=

d=

$第$%v$步$

$ 兩列互換得： $

s = 2 (slider from 0 to 5, step 0.1)
L1 = Sequence(Random[-5, 5] + s * 0, i, 1, 20)
a = 1 (slider from -9 to 9, step 1)
d = 4 (slider from -9 to 9, step 1)
c = 3 (slider from -9 to 9, step 1)
b = 2 (slider from -9 to 9, step 1)
D: a * d - b * c
inputBox1 = Textfield(a)
inputBox2 = Textfield(b)
inputBox3 = Textfield(c)
inputBox4 = Textfield(d)
det: a * d - b * c
Step1: "A=\left [ \begin{array}{}" + (LaTeX[a]) + " & " + (LaTeX[b]) + " \\ " + (LaTeX[c]) + " &" + (LaTeX[d]) + " \\ \end{array}  \right ] ⇒det(A)=\left\vert \begin{array}{cc} " + (LaTeX[a]) + " & " + (LaTeX[b]) + " \\ " + (LaTeX[c]) + " & " + (LaTeX[d]) + " \\ \end{array}  \right\vert =" + (LaTeX[det]) + ""
Step11: "$ " + (LaTeX[If[det ≟ 0, "反方陣不存在", ""]]) + " $"
text07: "$ \left [  \begin{array}{cc} 1&" + (LaTeX[FractionText[b / a]]) + " &" + (LaTeX[FractionText[1 / a]]) + "&0 \\0& " + (LaTeX[FractionText[(a * d - b * c) / a]]) + " & " + (LaTeX[FractionText[(-c) / a]]) + "&1 \\ \end{array} \right ]  $"
text09: "$ \left [ \begin{array}{cc} 1&" + (LaTeX[FractionText[b / a]]) + " & " + (LaTeX[FractionText[1 / a]]) + "&0 \\ 0&1&" + (LaTeX[FractionText[(-c) / (a * d - b * c)]]) + " & " + (LaTeX[FractionText[a / det]]) + " \\ \end{array}  \right ]  $"
n = 0 (slider from 0 to If[det ≟ 0, 2, If[a ≟ 1, 11, 12]], step 1)
d_1: b / (d - b * c)
TEXT03: "$ \left [ \begin{array}{cc} " + (LaTeX[FractionText[a]]) + " & " + (LaTeX[FractionText[b]]) + " &1&0\\ " + (LaTeX[FractionText[c]]) + " & " + (LaTeX[FractionText[d]]) + " &0&1\\ \end{array}  \right ]  $"
TEXT05: "$ \left [  \begin{array}{cc} " + (LaTeX[FractionText[a]]) + " & " + (LaTeX[FractionText[b]]) + "&1&0 \\ 0 & " + (LaTeX[FractionText[d - b * c]]) + "&" + (LaTeX[FractionText[-c]]) + "&1 \\ \end{array} \right ]  $"
TEXT07: "$ \left [ \begin{array}{cc} 1&0&" + (LaTeX[FractionText[1 + c * d_1]]) + " & " + (LaTeX[FractionText[-d_1]]) + " \\0&" + (LaTeX[FractionText[d - b * c]]) + "& " + (LaTeX[FractionText[-c]]) + " & 1 \\ \end{array}  \right ]  $"
TEXT09: "$ \left [ \begin{array}{cc} 1 & 0&" + (LaTeX[FractionText[1 + c * d_1]]) + "&" + (LaTeX[FractionText[-d_1]]) + " \\ 0 & 1&" + (LaTeX[FractionText[(-c) / (d - b * c)]]) + "&" + (LaTeX[FractionText[1 / (d - b * c)]]) + " \\ \end{array}  \right ]  $"
TEXT10: "$ ⇒A^{-1}=\left [\begin{array}{cc} " + (LaTeX[FractionText[1 + c * d_1]]) + " & " + (LaTeX[FractionText[-d_1]]) + " \\ " + (LaTeX[FractionText[(-c) / (d - b * c)]]) + " & " + (LaTeX[FractionText[1 / (d - b * c)]]) + " \\ \end{array}   \right ]  $"
text03: "$[\;A\;|\;I\;]= \left [\begin{array}{cc} " + (LaTeX[FractionText[a]]) + " & " + (LaTeX[FractionText[b]]) + "&1&0 \\ " + (LaTeX[FractionText[c]]) + " & " + (LaTeX[FractionText[d]]) + "&0&1 \\ \end{array}   \right ]  $"
text05: "$ \left [ \begin{array}{cc} " + (LaTeX[FractionText[a]]) + " & " + (LaTeX[FractionText[b]]) + "&1&0 \\0&" + (LaTeX[FractionText[d - b * c / a]]) + "& " + (LaTeX[FractionText[(-c) / a]]) + "&1 \\ \end{array}  \right ]  $"
T5: "$ \left [ \begin{array}{cc} " + (LaTeX[c]) + "&" + (LaTeX[d]) + "&0 &1 \\0&" + (LaTeX[b]) + "&1 & 0 \\ \end{array}  \right ]  $"
T6: "$ 第一列乘以\;" + (LaTeX[FractionText[1 / c]]) + "\;得： $"
T7: "$ \left [  \begin{array}{cc}1&" + (LaTeX[FractionText[d / c]]) + " &0 &" + (LaTeX[FractionText[1 / c]]) + " \\ 0&" + (LaTeX[b]) + "&1 &0 \\ \end{array} \right ]  $"
T9: "$ \left [ \begin{array}{cc} 1&" + (LaTeX[FractionText[d / c]]) + "&0 &" + (LaTeX[FractionText[1 / c]]) + " \\ 0&1&" + (LaTeX[FractionText[1 / b]]) + " & 0 \\ \end{array}  \right ]  $"
T10: "$ 第二列乘以\;" + (LaTeX[FractionText[(-d) / c]]) + "\;加到第一列得： $"
T11: "$ \left [ \begin{array}{cc}1&0&" + (LaTeX[FractionText[-b * c / d]]) + " & " + (LaTeX[FractionText[1 / c]]) + " \\ 0&1&" + (LaTeX[FractionText[1 / b]]) + " & 0 \\ \end{array}  \right ]  $"
T12: "$ ⇒A^{-1}=\left [\begin{array}{cc} " + (LaTeX[FractionText[(-d) / b * c]]) + " & " + (LaTeX[FractionText[1 / c]]) + " \\ " + (LaTeX[FractionText[1 / b]]) + " & 0 \\ \end{array}   \right ]  $"
T3: "$\left [ \;A\;|\;I\; \right ] = \left [ \begin{array}{cc} 0 & " + (LaTeX[b]) + " &1&0\\ " + (LaTeX[c]) + " & " + (LaTeX[d]) + " &0&1\\ \end{array}  \right ]   $"
TEXT08: "$ 將第三列乘以\;" + (LaTeX[FractionText[1 / (d - b * c)]]) + " \;得：$"
TEXT04: "$ 將第一列乘以\;" + (LaTeX[FractionText[-c]]) + " \;加到第二列得：$"
TEXT06: "$ 將第二列乘以\;" + (LaTeX[FractionText[-d_1]]) + "\;加到第一列得：$"
T8: "$ 第二列乘以\;" + (LaTeX[FractionText[1 / b]]) + "\;得\;： $"
text06: "$ 第一列乘以\;" + (LaTeX[FractionText[1 / a]]) + "\;得 \;：$"
text08: "$ 第二列乘以\;" + (LaTeX[FractionText[a / (a * d - b * c)]]) + "\;得： $"
text10: "$ 第二列乘以\;" + (LaTeX[FractionText[(-b) / a]]) + "\;加到第一列，\;得： $"
text12: "$⇒ A^{-1}=\left [ \begin{array}{cc} " + (LaTeX[FractionText[d / det]]) + " & " + (LaTeX[FractionText[(-b) / det]]) + " \\ " + (LaTeX[FractionText[(-c) / det]]) + " & " + (LaTeX[FractionText[a / det]]) + " \\ \end{array}  \right ]  $"
text11: "$ \left [ \begin{array}{cc}1&0& " + (LaTeX[FractionText[(b * c) / (a * det) + 1 / a]]) + " & " + (LaTeX[FractionText[(-b) / det]]) + " \\ 0&1&" + (LaTeX[FractionText[(-c) / det]]) + " & " + (LaTeX[FractionText[a / det]]) + " \\ \end{array}  \right ]=[\;I\;|\;A^{-1}] $"
text04: "$ 第一列乘以\;" + (LaTeX[FractionText[(-c) / a]]) + "\;加到第二列得： $"