矩陣的乘法
Author: 藍邦偉  老師

矩陣的乘法

Random

Self Input

$ \left [ \begin{array}{cc} a_{11} & a_{12}  \ \end{array}  \right ] \left [ \begin{array}{cc} b_{11} \ b_{21} \ \end{array}  \right ]  $

$ \left [ \begin{array}{cc} a_{11}  \ a_{21} \ \end{array}  \right ]  \left [  \begin{array}{cc} b_{11} & b_{12} \ \end{array} \right ] $

$ \left [ \begin{array}{cc} a_{11} & a_{12} \  \ \end{array}  \right ] \left [ \begin{array}{cc} b_{11} & b_{12} \ b_{21} & b_{22} \ \end{array}  \right ]  $

s = 0.8 (slider from 0 to 1, step 0.1)
L2 = Sequence(Random[-5, 4] + s * 0, i, 1, 20)
L1 = Sequence(If[Element[L2, i] ≟ 0, 5, Element[L2, i]], i, 1, 18)
a_{11} = Element(L1, 1)
a_{12} = Element(L1, 2)
a_{21} = Element(L1, 4)
a_{22} = Element(L1, 5)
a_{31} = Element(L1, 7)
a_{32} = Element(L1, 8)
b_{11} = Element(L1, 10)
b_{12} = Element(L1, 11)
b_{13} = Element(L1, 12)
b_{22} = Element(L1, 14)
b_{21} = Element(L1, 13)
b_{23} = Element(L1, 15)
n = 3 (slider from 0 to 9, step 1)
a_{13} = Element(L1, 3)
a_{23} = Element(L1, 6)
a_{33} = Element(L1, 9)
b_{31} = Element(L1, 16)
b_{32} = Element(L1, 17)
b_{33} = Element(L1, 18)
A = (-120.33413251968445, 87.7250599999911)
text5: "$ \left [ \begin{array}{cc} " + (LaTeX[a_{11}]) + " & " + (LaTeX[a_{12}]) + " & " + (LaTeX[a_{13}]) + " \end{array}  \right ] \cdot \left [  \begin{array}{cc} " + (LaTeX[b_{11}]) + " \\ " + (LaTeX[b_{21}]) + " \\ " + (LaTeX[b_{31}]) + " \end{array} \right ] =\left [  " + (LaTeX[a_{11} * b_{11} + a_{12} * b_{21} + a_{13} * b_{31}]) + "\right ]  $"
text6: "$ \left [ \begin{array}{cc} " + (LaTeX[a_{11}]) + " \\ " + (LaTeX[a_{21}]) + " \\ " + (LaTeX[a_{31}]) + " \end{array}  \right ]\cdot  \left [ \begin{array}{cc} " + (LaTeX[b_{11}]) + " & " + (LaTeX[b_{12}]) + " & " + (LaTeX[b_{13}]) + " \end{array}  \right ] =\left [\begin{array}{cc} " + (LaTeX[a_{11} * b_{11}]) + " & " + (LaTeX[a_{11} * b_{12}]) + " & " + (LaTeX[a_{11} * b_{13}]) + " \\ " + (LaTeX[a_{21} * b_{11}]) + " & " + (LaTeX[a_{21} * b_{12}]) + " & " + (LaTeX[a_{21} * b_{13}]) + " \\ " + (LaTeX[a_{31} * b_{11}]) + " & " + (LaTeX[a_{31} * b_{12}]) + " &" + (LaTeX[a_{31} * b_{13}]) + " \\ \end{array}  \right ]  $"
text1: "$ \left [ \begin{array}{cc} " + (LaTeX[a_{11}]) + " & " + (LaTeX[a_{12}]) + " \end{array}  \right ]\cdot \left [  \begin{array}{cc} " + (LaTeX[b_{11}]) + " \\ " + (LaTeX[b_{21}]) + " \end{array} \right ] =[" + (LaTeX[a_{11} * b_{11} + a_{12} * b_{21}]) + "]  $"
text3: "$ \left [\begin{array}{cc} " + (LaTeX[a_{11}]) + " & " + (LaTeX[a_{12}]) + " \end{array}   \right ] \cdot \left [\begin{array}{cc} " + (LaTeX[b_{11}]) + "& " + (LaTeX[b_{12}]) + " \\ " + (LaTeX[b_{21}]) + " & " + (LaTeX[b_{22}]) + " \\ \end{array}   \right ] =\left [ \begin{array}{cc} " + (LaTeX[a_{11} * b_{11} + a_{12} * b_{21}]) + " & " + (LaTeX[a_{11} * b_{12} + a_{12} * b_{22}]) + " \end{array}  \right ]  $"
text4: "$ \left [ \begin{array}{cc} " + (LaTeX[a_{11}]) + " & " + (LaTeX[a_{12}]) + " \\ " + (LaTeX[a_{21}]) + " & " + (LaTeX[a_{22}]) + " \\ \end{array}  \right ]\cdot \left [ \begin{array}{cc} " + (LaTeX[b_{11}]) + " \\ " + (LaTeX[b_{21}]) + "  \end{array}  \right ]  =\left [ \begin{array}{cc} " + (LaTeX[a_{11} * b_{11} + a_{12} * b_{21}]) + " \\" + (LaTeX[a_{21} * b_{11} + a_{22} * b_{21}]) + "  \end{array}  \right ]  $"
text7: "$ \left [ \begin{array}{cc} " + (LaTeX[a_{11}]) + " & " + (LaTeX[a_{12}]) + "  \\" + (LaTeX[a_{21}]) + " & " + (LaTeX[a_{22}]) + "\\" + (LaTeX[a_{31}]) + " & " + (LaTeX[a_{32}]) + "  \\ \end{array} \right ] \cdot \left [  \begin{array}{cc} " + (LaTeX[b_{11}]) + " & " + (LaTeX[b_{12}]) + "& " + (LaTeX[b_{13}]) + " \\ " + (LaTeX[b_{21}]) + " & " + (LaTeX[b_{22}]) + " &" + (LaTeX[b_{23}]) + "  \\ \end{array}\right ]=\left [\begin{array}{cc} " + (LaTeX[a_{11} * b_{11} + a_{12} * b_{21}]) + " & " + (LaTeX[a_{11} * b_{12} + a_{12} * b_{22}]) + " & " + (LaTeX[a_{11} * b_{13} + a_{12} * b_{23}]) + " \\ " + (LaTeX[a_{21} * b_{11} + a_{22} * b_{21}]) + " & " + (LaTeX[a_{21} * b_{12} + a_{22} * b_{22}]) + " & " + (LaTeX[a_{21} * b_{13} + a_{22} * b_{23}]) + " \\ " + (LaTeX[a_{31} * b_{11} + a_{32} * b_{21}]) + " & " + (LaTeX[a_{31} * b_{12} + a_{32} * b_{22}]) + " & " + (LaTeX[a_{31} * b_{13} + a_{32} * b_{23}]) + " \\ \end{array}  \right ]   $"
text9: "$ \left [ \begin{array}{cc} " + (LaTeX[a_{11}]) + " & " + (LaTeX[a_{12}]) + " &" + (LaTeX[a_{13}]) + " \\ " + (LaTeX[a_{21}]) + "& " + (LaTeX[a_{22}]) + " &" + (LaTeX[a_{23}]) + "\\ " + (LaTeX[a_{31}]) + "& " + (LaTeX[a_{32}]) + " &" + (LaTeX[a_{33}]) + " \\ \end{array} \right ]\cdot   \left [  \begin{array}{cc} " + (LaTeX[b_{11}]) + " & " + (LaTeX[b_{12}]) + " & " + (LaTeX[b_{13}]) + " \\ " + (LaTeX[b_{21}]) + " & " + (LaTeX[b_{22}]) + " &" + (LaTeX[b_{23}]) + " \\ " + (LaTeX[b_{31}]) + " & " + (LaTeX[b_{32}]) + " & " + (LaTeX[b_{33}]) + " \\ \end{array}\right ] $
$=\left [  \begin{array}{cc} " + (LaTeX[a_{11} * b_{11} + a_{12} * b_{21} + a_{13} * b_{31}]) + " & " + (LaTeX[a_{11} * b_{12} + a_{12} * b_{22} + a_{13} * b_{32}]) + " & " + (LaTeX[a_{11} * b_{13} + a_{12} * b_{23} + a_{13} * b_{33}]) + " \\ " + (LaTeX[a_{21} * b_{11} + a_{22} * b_{21} + a_{23} * b_{31}]) + " & " + (LaTeX[a_{21} * b_{12} + a_{22} * b_{22} + a_{23} * b_{32}]) + " & " + (LaTeX[a_{21} * b_{13} + a_{22} * b_{23} + a_{23} * b_{33}]) + " \\ " + (LaTeX[a_{31} * b_{11} + a_{32} * b_{21} + a_{33} * b_{31}]) + "& " + (LaTeX[a_{31} * b_{12} + a_{32} * b_{22} + a_{33} * b_{32}]) + " & " + (LaTeX[a_{31} * b_{13} + a_{32} * b_{23} + a_{33} * b_{33}]) + " \\ \end{array}\right ] $"
text8: "$ \left [ \begin{array}{cc} " + (LaTeX[a_{11}]) + " & " + (LaTeX[a_{12}]) + " & " + (LaTeX[a_{13}]) + " \\ " + (LaTeX[a_{21}]) + " & " + (LaTeX[a_{22}]) + " & " + (LaTeX[a_{23}]) + " \\ \end{array} \right ] \cdot \left [  \begin{array}{cc} " + (LaTeX[b_{11}]) + " &" + (LaTeX[b_{12}]) + "  \\ " + (LaTeX[b_{21}]) + "& " + (LaTeX[b_{22}]) + "  \\ " + (LaTeX[b_{31}]) + " & " + (LaTeX[b_{32}]) + "  \\ \end{array}\right ] =\left [ \begin{array}{cc} " + (LaTeX[a_{11} * b_{11} + a_{12} * b_{21} + a_{13} * b_{31}]) + " & " + (LaTeX[a_{11} * b_{12} + a_{12} * b_{22} + a_{13} * b_{32}]) + " \\ " + (LaTeX[a_{21} * b_{11} + a_{22} * b_{21} + a_{23} * b_{31}]) + " & " + (LaTeX[a_{21} * b_{12} + a_{22} * b_{22} + a_{23} * b_{32}]) + " \\ \end{array}  \right ]  $"
text2: "$ \left [\begin{array}{cc} " + (LaTeX[a_{11}]) + " \\ " + (LaTeX[a_{21}]) + " \end{array}   \right ]\cdot \left [\begin{array}{cc} " + (LaTeX[b_{11}]) + " & " + (LaTeX[b_{12}]) + "  \end{array}  \right ] =\left [ \begin{array}{cc} " + (LaTeX[a_{11} * b_{11}]) + " & " + (LaTeX[a_{11} * b_{12}]) + " \\ " + (LaTeX[a_{21} * b_{11}]) + " & " + (LaTeX[a_{21} * b_{12}]) + " \\ \end{array}  \right ]   $"
a = false
b = true
c_{11} = 1 (slider from -9 to 9, step 1)
c_{12} = 2 (slider from -5 to 5, step 1)
c_{13} = 3 (slider from -5 to 5, step 1)
c_{21} = 4 (slider from -5 to 5, step 1)
c_{22} = 5 (slider from -5 to 5, step 1)
c_{23} = 0 (slider from -5 to 5, step 1)
c_{31} = -1 (slider from -5 to 5, step 1)
c_{32} = -2 (slider from -5 to 5, step 1)
c_{33} = -3 (slider from -5 to 5, step 1)
d_{11} = -5 (slider from -5 to 5, step 1)
d_{12} = -4 (slider from -5 to 5, step 1)
d_{13} = -3 (slider from -5 to 5, step 1)
d_{21} = -2 (slider from -5 to 5, step 1)
d_{22} = -1 (slider from -5 to 5, step 1)
d_{23} = 1 (slider from -5 to 5, step 1)
d_{31} = 2 (slider from -5 to 5, step 1)
d_{32} = 3 (slider from -5 to 5, step 1)
d_{33} = 4 (slider from -5 to 5, step 1)
T01: "$ \left [ \begin{array}{cc} " + (LaTeX[c_{11}]) + " & " + (LaTeX[c_{12}]) + "  \\ \end{array}  \right ] \left [\begin{array}{cc} " + (LaTeX[d_{11}]) + "  \\ " + (LaTeX[d_{21}]) + "  \\ \end{array}   \right ]=\left [  " + (LaTeX[c_{11} * d_{11} + c_{12} * d_{21}]) + "\right ]   $"
B: A - (0, 45)
T02: "$ \left [\begin{array}{cc} " + (LaTeX[c_{11}]) + " \\" + (LaTeX[c_{21}]) + " \\ \end{array}   \right ]  \left [\begin{array}{cc} " + (LaTeX[d_{11}]) + " &" + (LaTeX[d_{12}]) + "  \\ \end{array}   \right ]=\left [ \begin{array}{cc} " + (LaTeX[d_{11} * c_{11}]) + " & " + (LaTeX[c_{11} * d_{12}]) + " \\ " + (LaTeX[c_{21} * d_{11}]) + " & " + (LaTeX[c_{21} * d_{12}]) + " \\ \end{array}  \right ]  $"
T03: "$ \left [\begin{array}{cc} " + (LaTeX[c_{11}]) + " & " + (LaTeX[c_{12}]) + "  \\ \end{array}   \right ] \left [ \begin{array}{cc} " + (LaTeX[d_{11}]) + " & " + (LaTeX[d_{12}]) + " \\ " + (LaTeX[d_{21}]) + "& " + (LaTeX[d_{22}]) + " \\ \end{array}  \right ]  =\left [  \begin{array}{cc} " + (LaTeX[c_{11} * d_{11} + c_{12} * d_{21}]) + " & " + (LaTeX[c_{11} * d_{12} + c_{12} * d_{22}]) + "  \\ \end{array} \right ] $"