矩阵求逆:高斯-若尔当消元法
几何画板及绘图内容加载中,请稍等……
这个范例演示了如何使用高斯-若尔当消元法求解矩阵的逆矩阵。核心数学概念包括矩阵运算和线性代数。通过一系列构造步骤,使用了诸如Sequence, Flatten, Take等GeoGebra命令。适合高中及以上学生学习矩阵运算和线性代数。
GeoGebra 命令及参数
Sequence(Sequence[If[i ≟ j, 1, 0], i, 1, n], j, 1, n) → matriz11Flatten(Append[Take[lista1, 1, m], Element[matriz11, 1]]) → listaf1Flatten(Append[Take[lista7, 1, m], Element[matriz11, 5]]) → listaf5Flatten(Append[Take[lista8, 1, m], Element[matriz11, 6]]) → listaf6Flatten(Append[Take[lista2, 1, m], Element[matriz11, 2]]) → listaf2Flatten(Append[Take[lista5, 1, m], Element[matriz11, 3]]) → listaf3Take({a_1, a_8, a_{15}, a_{22}, a_{29}, a_{36}}, 1, n) → listac1Flatten(Append[Take[lista6, 1, m], Element[matriz11, 4]]) → listaf4IndexOf(f, listac1) → hCountIf(t ≟ f, t, listac1) → eSequence((f(x) * i / i), i, 1, e) → lista4Sequence(Take[lista4, 1, i], i, 1, e - 1) → lista9Sequence(IndexOf[f, Remove[listac1, Element[lista9, i]]], i, 1, e - 1) → lista10Sequence(Element[lista10, i] + i, i, 1, e - 1) → lista11Join({{h}, lista11}) → lista13Remove(Sequence[i, i, 1, n], lista13) → lista14Remove(Sequence[i, i, 1, n], {Element[lista14, 1], Element[lista13, 1]}) → lista15Insert(Element[lista14, 1], lista15, 1) → lista16If(Element[listac1, 1] ≟ f, Insert[Element[lista13, 1], lista16, Element[lista14, 1]], Sequence[i, i, 1, n]) → lista17Sort(Take[{listaf1, listaf2, listaf3, listaf4, listaf5, listaf6}, 1, n], lista17) → matriz1Sequence(If[i ≟ 1, Sequence[Expand[Element[matriz1, i, j] / Element[matriz1, 1, 1]], j, 1, (2 * n)], Element[matriz1, i]], i, 1, n) → matriz2Sequence(If[Element[matriz2, i, 1] ≠ f, Sequence[Expand[((-Element[matriz2, i, 1]) * Element[matriz2, 1, j]) + Element[matriz2, i, j]], j, 1, (2 * n)], Element[matriz1, i]], i, 2, n) → matriz3Insert({Element[matriz2, 1]}, matriz3, 1) → lista18If(Element[lista18, 2, 2] ≠ f, {1, 2, 3, 4}, If[Element[lista18, 3, 2] ≠ f, {1, 3, 2, 4}, {1, 4, 3, 2}]) → r_1Sort(lista18, r_1) → matriz18Sequence(If[i ≟ 2, Sequence[Expand[Element[matriz18, i, j] / Element[matriz18, 2, 2]], j, 1, (2 * n)], Element[matriz18, i]], i, 1, n) → matriz19Expand((-Element[matriz19, 3, 2])) → h_2Expand((-Element[matriz19, 4, 2])) → g_2Element(lista18, 3, 2) → rElement(listac1, Element[lista14, 1]) → pAppend(Sequence[Expand[Element[lista1, i] / a_1(x)], i, 1, m], Expand[Element[listater, 1] / a_1(x)]) → listaf12Take({"f_1", "f_2", "f_3", "f_4", "f_5", "f_6"}, 1, n) → lista3Element(lista3, Element[lista13, 1]) → texto38Element(lista3, Element[lista14, 1]) → texto39Textfield(a_{21}) → c_{13}Textfield(a_{28}) → c_{14}Textfield(a_{35}) → c_{15}Textfield(a_{42}) → c_{16}Textfield(a_{28}) → c_{24}Textfield(a_{35}) → c_{25}Textfield(a_{42}) → c_{26}Textfield(a_{35}) → c_{35}Textfield(a_{42}) → c_{36}Textfield(a_{42}) → c_{46}Textfield(a_1) → a_{73}Textfield(a_2) → a_{74}Textfield(a_3) → a_{77}Textfield(a_4) → a_{47}Textfield(a_5) → a_{75}Textfield(a_6) → a_{48}Textfield(a_8) → a_{49}Textfield(a_9) → a_{76}Textfield(a_{10}) → a_{67}Textfield(a_{11}) → a_{68}Textfield(a_{12}) → a_{69}Textfield(a_{13}) → a_{70}Textfield(a_{15}) → a_{50}Textfield(a_{16}) → a_{57}Textfield(a_{17}) → a_{58}Textfield(a_{18}) → a_{59}Textfield(a_{19}) → a_{60}Textfield(a_{20}) → a_{78}Textfield(a_{22}) → a_{71}Textfield(a_{23}) → a_{72}Textfield(a_{24}) → a_{43}Textfield(a_{25}) → a_{44}Textfield(a_{26}) → a_{45}Textfield(a_{27}) → a_{46}Textfield(a_{29}) → a_{51}Textfield(a_{30}) → a_{52}Textfield(a_{31}) → a_{53}Textfield(a_{32}) → a_{54}Textfield(a_{33}) → a_{55}Textfield(a_{34}) → a_{56}Textfield(a_{36}) → a_{61}Textfield(a_{37}) → a_{62}Textfield(a_{38}) → a_{63}Textfield(a_{39}) → a_{64}Textfield(a_{40}) → a_{65}Textfield(a_{41}) → a_{66}Take({a_2, a_9, a_{16}, a_{23}, a_{30}, a_{37}}, 1, n) → listac2Take({a_3, a_{10}, a_{17}, a_{24}, a_{31}, a_{38}}, 1, n) → listac3Take({a_4, a_{11}, a_{18}, a_{25}, a_{32}, a_{39}}, 1, n) → listac4Take({a_5, a_{12}, a_{19}, a_{26}, a_{33}, a_{40}}, 1, n) → listac5Take({a_6, a_{13}, a_{20}, a_{27}, a_{34}, a_{41}}, 1, n) → listac6IndexOf(f, listac1) → gRemove(listac1, {f, f}) → lista12Element(lista3, 1) → texto41If(Element[listac1, 1] ≟ f, texto40, texto43) → texto42If(n ≟ 1, 0, If[n ≟ 2, 4, If[n ≟ 3, 7, If[n ≟ 4, 10, If[n ≟ 5, 10, 12]]]]) → b_1If(m ≟ 6, 115, If[m ≟ 5, 120, If[m ≟ 4, 155, If[m ≟ 3, 195, If[m ≟ 2, 230]]]]) → wTextfield(n) → CasillaDeEntrada2TableText(Take[{listaf1, listaf2, listaf3, listaf4, listaf5, listaf6}, 1, n], If[m ≟ 6, "c() |0000001000000", If[m ≟ 5, "c() |00000100000", If[m ≟ 4, "c() |000010000", If[m ≟ 3, "c() |0001000", If[m ≟ 2, "c() |00100", "c() |010"]]]]]) → matriz1_1TableText(matriz2, If[m ≟ 6, "c() |0000001000000", If[m ≟ 5, "c() |00000100000", If[m ≟ 4, "c() |000010000", If[m ≟ 3, "c() |0001000", If[m ≟ 2, "c() |00100", "c() |010"]]]]]) → texto1TableText(lista18, If[m ≟ 6, "c() |0000001000000", If[m ≟ 5, "c() |00000100000", If[m ≟ 4, "c() |000010000", If[m ≟ 3, "c() |0001000", If[m ≟ 2, "c() |00100", "c() |010"]]]]]) → texto2Sequence(If[Element[matriz2, i, 1] ≟ f, " ", (((Expand[(-Element[matriz2, i, 1])] * Element[lista3, 1]) * "+") * Element[lista3, i])], i, 2, n) → lista20TableText({lista20}, "cv") → texto4If((k > l) ∧ (k > 1), -1, If[(k < l) ∧ (k ≥ 1), 1, 0]) → jSequence(If[i ≟ 2, Sequence[Expand[Element[lista18, i, j] / Element[lista18, 2, 2]], j, 1, (2 * n)], Element[lista18, i]], i, 1, n) → matriz5Take({lista1, lista2, lista5, lista6, lista7, lista8}, 1, n) → matriz6Sequence(Sequence[Element[matriz6, j, i], i, 1, n], j, 1, n) → matriz7TableText(matriz5, If[m ≟ 6, "c() |0000001000000", If[m ≟ 5, "c() |00000100000", If[m ≟ 4, "c() |000010000", If[m ≟ 3, "c() |0001000", If[m ≟ 2, "c() |00100", "c() |010"]]]]]) → texto3If(n ≟ 2 ∧ (k > 2), 60, If[n ≟ 3 ∧ (k > 2), 285, If[n ≟ 4 ∧ (k > 2), 408, 0]]) → aElement(lista18, 2, 2) → qSequence(If[i ≟ 2, Element[matriz5, 2], Sequence[Expand[((-Element[matriz5, i, 2]) * Element[matriz5, 2, j]) + Element[matriz5, i, j]], j, 1, (2 * n)]], i, 1, n) → matriz8TableText(matriz8, If[m ≟ 6, "c() |0000001000000", If[m ≟ 5, "c() |00000100000", If[m ≟ 4, "c() |000010000", If[m ≟ 3, "c() |0001000", If[m ≟ 2, "c() |00100", "c() |010"]]]]]) → texto7Sequence(If[Element[matriz2, i, 1] ≟ f, " ", (((Expand[(-Element[matriz2, i, 1])] * Element[lista3, 1]) * "+") * Element[lista3, i])], i, 2, n) → lista21Sequence(If[Element[matriz5, i, 2] ≟ f, " ", If[i ≟ 2, " ", (((Expand[(-Element[matriz5, i, 2])] * Element[lista3, 2]) * "+") * Element[lista3, i])]], i, 1, n) → lista22TableText({lista22}, "cv") → texto10If(Element[listac1, 1] ≟ f, texto40, texto43) → texto13TableText({lista20}, "cv") → texto15TableText(matriz2, If[m ≟ 6, "c() |0000001000000", If[m ≟ 5, "c() |00000100000", If[m ≟ 4, "c() |000010000", If[m ≟ 3, "c() |0001000", If[m ≟ 2, "c() |00100", "c() |010"]]]]]) → texto16TableText(lista18, If[m ≟ 6, "c() |0000001000000", If[m ≟ 5, "c() |00000100000", If[m ≟ 4, "c() |000010000", If[m ≟ 3, "c() |0001000", If[m ≟ 2, "c() |00100", "c() |010"]]]]]) → texto17Sort(lista18, {1, 3, 2}) → matriz9If(Element[lista18, 2, 2] ≟ f, texto21, texto19) → texto22If(Element[lista18, 2, 2] ≟ f, " ", texto8) → texto26Sort(lista18, {1, 3, 2}) → matriz12Sequence(If[i ≟ 1, Sequence[Expand[Element[matriz1, i, j] / Element[matriz1, 1, 1]], j, 1, (2 * n)], Element[matriz1, i]], i, 1, n) → matriz13Sequence(If[i ≟ 2, Sequence[Expand[Element[If[q ≟ f, matriz9, lista18], i, j] / Element[If[q ≟ f, matriz9, lista18], 2, 2]], j, 1, (2 * n)], Element[If[q ≟ f, matriz9, lista18], i]], i, 1, n) → matriz14TableText(matriz14, If[m ≟ 6, "c() |0000001000000", If[m ≟ 5, "c() |00000100000", If[m ≟ 4, "c() |000010000", If[m ≟ 3, "c() |0001000", If[m ≟ 2, "c() |00100", "c() |010"]]]]]) → texto25Sequence(If[i ≟ 3, Sequence[Expand[(Element[matriz14, 2, j] * (-Element[matriz14, 3, 2])) + Element[matriz14, 3, j]], j, 1, (2 * n)], Element[matriz14, i]], i, 1, n) → matriz10Expand((-Element[matriz14, 3, 2])) → sTableText(matriz10, If[m ≟ 6, "c() |0000001000000", If[m ≟ 5, "c() |00000100000", If[m ≟ 4, "c() |000010000", If[m ≟ 3, "c() |0001000", If[m ≟ 2, "c() |00100", "c() |010"]]]]]) → texto24Element(matriz10, 3, 3) → tSequence(If[i ≟ 3, Sequence[Expand[Element[matriz10, 3, j] / If[Element[matriz10, 3, 3] ≟ f, 1, Element[matriz10, 3, 3]]], j, 1, (2 * n)], Element[matriz10, i]], i, 1, n) → matriz15TableText(matriz15, If[m ≟ 6, "c() |0000001000000", If[m ≟ 5, "c() |00000100000", If[m ≟ 4, "c() |000010000", If[m ≟ 3, "c() |0001000", If[m ≟ 2, "c() |00100", "c() |010"]]]]]) → texto30Sequence(If[i ≠ 3, Sequence[Expand[((-Element[matriz15, i, 3]) * Element[matriz15, 3, j]) + Element[matriz15, i, j]], j, 1, (2 * n)], Element[matriz15, i]], i, 1, n) → matriz16TableText(matriz16, If[m ≟ 6, "c() |0000001000000", If[m ≟ 5, "c() |00000100000", If[m ≟ 4, "c() |000010000", If[m ≟ 3, "c() |0001000", If[m ≟ 2, "c() |00100", "c() |010"]]]]]) → texto33Expand((-Element[matriz15, 2, 3])) → f_1Expand((-Element[matriz15, 1, 3])) → p_1Sequence(If[i ≟ 1, Sequence[Expand[((-Element[matriz16, 1, 2]) * Element[matriz16, 2, j]) + Element[matriz16, i, j]], j, 1, (2 * n)], Element[matriz16, i]], i, 1, n) → matriz17Expand((-Element[matriz16, 1, 2])) → q_1TableText(matriz17, If[m ≟ 6, "c() |0000001000000", If[m ≟ 5, "c() |00000100000", If[m ≟ 4, "c() |000010000", If[m ≟ 3, "c() |0001000", If[m ≟ 2, "c() |00100", "c() |010"]]]]]) → texto37If(Element[listac1, 1] ≟ f, texto40, texto43) → texto47TableText(matriz2, If[m ≟ 6, "c() |0000001000000", If[m ≟ 5, "c() |00000100000", If[m ≟ 4, "c() |000010000", If[m ≟ 3, "c() |0001000", If[m ≟ 2, "c() |00100", "c() |010"]]]]]) → texto49TableText({lista20}, "cv") → texto52TableText(lista18, If[m ≟ 6, "c() |0000001000000", If[m ≟ 5, "c() |00000100000", If[m ≟ 4, "c() |000010000", If[m ≟ 3, "c() |0001000", If[m ≟ 2, "c() |00100", "c() |010"]]]]]) → texto53IndexOf(r_1, Sequence[Element[lista18, i, 2], i, 2, 4]) → cIf(Element[lista18, 2, 2] ≠ f, {1, 2, 3, 4}, If[Element[lista18, 3, 2] ≠ f, {1, 3, 2, 4}, {1, 4, 3, 2}]) → lista23Element(lista18, 4, 2) → s_1TableText(matriz19, If[m ≟ 6, "c() |0000001000000", If[m ≟ 5, "c() |00000100000", If[m ≟ 4, "c() |000010000", If[m ≟ 3, "c() |0001000", If[m ≟ 2, "c() |00100", "c() |010"]]]]]) → texto61Element(matriz19, 3, 3) → t_1Element(matriz19, 4, 3) → f_2If(Element[lista18, 2, 2] ≠ f, texto54, If[Element[lista18, 3, 2] ≠ f, texto55, texto57]) → texto58Sequence(If[i > 2, Sequence[Expand[((-Element[matriz19, i, 2]) * Element[matriz19, 2, j]) + Element[matriz19, i, j]], j, 1, (2 * n)], Element[matriz19, i]], i, 1, n) → matriz20If(r ≟ f ∧ s ≟ f, " ", texto66) → texto65TableText(matriz20, If[m ≟ 6, "c() |0000001000000", If[m ≟ 5, "c() |00000100000", If[m ≟ 4, "c() |000010000", If[m ≟ 3, "c() |0001000", If[m ≟ 2, "c() |00100", "c() |010"]]]]]) → texto68Element(matriz20, 3, 3) → p_2Element(matriz20, 4, 3) → q_2If(p_2 ≠ f, {1, 2, 3, 4}, {1, 2, 4, 3}) → lista24Sort(matriz20, lista24) → matriz21Sequence(If[i ≟ 3, Sequence[Expand[Element[matriz21, i, j] / Element[matriz21, 3, 3]], j, 1, (2 * n)], Element[matriz21, i]], i, 1, n) → matriz22If(p_2 ≟ f, texto72, texto73) → texto74TableText(matriz22, If[m ≟ 6, "c() |0000001000000", If[m ≟ 5, "c() |00000100000", If[m ≟ 4, "c() |000010000", If[m ≟ 3, "c() |0001000", If[m ≟ 2, "c() |00100", "c() |010"]]]]]) → texto77Sequence(If[i > 3, Sequence[Expand[((-Element[matriz22, i, 3]) * Element[matriz22, 3, j]) + Element[matriz22, i, j]], j, 1, (2 * n)], Element[matriz22, i]], i, 1, n) → matriz23Expand((-Element[matriz23, 4, 4])) → r_2TableText(matriz23, If[m ≟ 6, "c() |0000001000000", If[m ≟ 5, "c() |00000100000", If[m ≟ 4, "c() |000010000", If[m ≟ 3, "c() |0001000", If[m ≟ 2, "c() |00100", "c() |010"]]]]]) → texto83Element(matriz23, 4, 4) → s_2Sequence(If[i ≟ 4, Sequence[Expand[Element[matriz23, i, j] / Element[matriz23, 4, 4]], j, 1, (2 * n)], Element[matriz23, i]], i, 1, n) → matriz24TableText(matriz24, If[m ≟ 6, "c() |0000001000000", If[m ≟ 5, "c() |00000100000", If[m ≟ 4, "c() |000010000", If[m ≟ 3, "c() |0001000", If[m ≟ 2, "c() |00100", "c() |010"]]]]]) → texto87Sequence(If[i < 4, Sequence[Expand[((-Element[matriz24, i, 4]) * Element[matriz24, 4, j]) + Element[matriz24, i, j]], j, 1, (2 * n)], Element[matriz24, i]], i, 1, n) → matriz25TableText(matriz25, If[m ≟ 6, "c() |0000001000000", If[m ≟ 5, "c() |00000100000", If[m ≟ 4, "c() |000010000", If[m ≟ 3, "c() |0001000", If[m ≟ 2, "c() |00100", "c() |010"]]]]]) → texto90Expand((-Element[matriz24, 1, 4])) → t_2Expand((-Element[matriz24, 2, 4])) → f_3Expand((-Element[matriz24, 3, 4])) → g_3Sequence(If[i < 3, Sequence[Expand[((-Element[matriz25, i, 3]) * Element[matriz25, 3, j]) + Element[matriz25, i, j]], j, 1, (2 * n)], Element[matriz25, i]], i, 1, n) → matriz26Expand((-Element[matriz25, 1, 3])) → h_3Expand((-Element[matriz25, 2, 3])) → p_3TableText(matriz26, If[m ≟ 6, "c() |0000001000000", If[m ≟ 5, "c() |00000100000", If[m ≟ 4, "c() |000010000", If[m ≟ 3, "c() |0001000", If[m ≟ 2, "c() |00100", "c() |010"]]]]]) → texto94Sequence(If[i < 2, Sequence[Expand[((-Element[matriz26, i, 2]) * Element[matriz26, 2, j]) + Element[matriz26, i, j]], j, 1, (2 * n)], Element[matriz26, i]], i, 1, n) → matriz27Expand((-Element[matriz26, 1, 2])) → q_3TableText(matriz27, If[m ≟ 6, "c() |0000001000000", If[m ≟ 5, "c() |00000100000", If[m ≟ 4, "c() |000010000", If[m ≟ 3, "c() |0001000", If[m ≟ 2, "c() |00100", "c() |010"]]]]]) → texto97Expand((-Element[matriz22, 4, 3])) → r_3