“矩陣”的版本间的差异
来自GeoGebra Manual
第12行: | 第12行: | ||
*<code>matrix(1, 1)</code> 取出第一列第一行的元素:''1''。 | *<code>matrix(1, 1)</code> 取出第一列第一行的元素:''1''。 | ||
*<code>matrix(2, 2)</code>、<code>matrix(-1,2)</code>、<code>matrix(2,-1)</code> 和 <code>matrix(-1,-1)</code> 等指令都是取出第二列第二行的元素:''4''。 | *<code>matrix(2, 2)</code>、<code>matrix(-1,2)</code>、<code>matrix(2,-1)</code> 和 <code>matrix(-1,-1)</code> 等指令都是取出第二列第二行的元素:''4''。 | ||
− | *一般來說,<code>matrix(''i'', ''j'') </code>(''i'' 和 ''j'' 為整數)會取出矩陣第 ''i'' 列第 ''j'' 行的元素。</div>}} | + | *一般來說,<code>matrix(''i'', ''j'')</code>( ''i'' 和 ''j'' 為整數)會取出矩陣第 ''i'' 列第 ''j'' 行的元素。</div>}} |
==矩陣運算== | ==矩陣運算== |
2021年6月13日 (日) 05:04的版本
本页为官方文件,一般使用者无法修改,若有任何误谬,请与官方联络。如欲编辑,请至本页的开放版。
GeoGebra 支援实数矩阵,将矩阵的每一列作为元素,以二维串列来储存矩阵。
范例: 在 GeoGebra 中,用 {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}} 表示一个 3x3 矩阵 \begin{pmatrix}1&2&3\\ 4&5&6\\ 7&8&9 \end{pmatrix}
要在 绘图区用 LaTeX 格式显示一个矩阵,可以使用 FormulaText_指令,或从代数区拖曳一个矩阵物件放到绘图区。
范例: 在指令列输入
FormulaText[{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}]
会产生一个 LaTeX 格式的矩阵。取用矩阵的元素
想要取用串列的特定元素(element),您可以使用 Element_指令或下列范例中的简化语法:
范例: 假设矩阵
matrix={{1, 2}, {3, 4}}
,则:matrix(1, 1)
取出第一列第一行的元素:1。matrix(2, 2)
、matrix(-1,2)
、matrix(2,-1)
和matrix(-1,-1)
等指令都是取出第二列第二行的元素:4。- 一般来说,
matrix(i, j)
( i 和 j 为整数)会取出矩阵第 i 列第 j 行的元素。
矩阵运算
Matrix operations are operations with lists, so the following syntaxes produce the described results.
备注: Some syntaxes can represent operations which are not defined in the same way in the matrices set.
加法与减法
Matrix1 + Matrix2
: adds the corresponding elements of two compatible matrices.Matrix1 – Matrix2
: subtracts the corresponding elements of two compatible matrices.
乘法与除法
Matrix * Number
: multiplies each element of Matrix by the given Number.Matrix1 * Matrix2
: uses matrix multiplication to calculate the resulting matrix.
- 备注: The rows of the first and columns of the second matrix need to have the same number of elements.
- 范例: {{1, 2}, {3, 4}, {5, 6}} * {{1, 2, 3}, {4, 5, 6}} yields the matrix {{9, 12, 15}, {19, 26, 33}, {29, 40, 51}}.
2x2 Matrix * Point (or Vector)
: multiplies the Matrix by the given Point / Vector and yields a point.
- 范例: {{1, 2}, {3, 4}} * (3, 4) yields the point A = (11, 25).
3x3 Matrix * Point (or Vector)
: multiplies the Matrix by the given Point / Vector and yields a point.
- 范例: {{1, 2, 3}, {4, 5, 6}, {0, 0, 1}} * (1, 2) gives you the point A = (8, 20).
- 备注: This is a special case for affine transformations where homogeneous coordinates are used: (x, y, 1) for a point and (x, y, 0) for a vector. This example is therefore equivalent to:
{{1, 2, 3}, {4, 5, 6}, {0, 0, 1}} * {1, 2, 1}
.
Matrix1 / Matrix2
: Divides each element of Matrix1 by the corresponding element in Matrix2.
- 备注: However, GeoGebra supports the syntax
Matrix1 * Matrix2 ^(-1)
.
其他运算
The section Matrix Commands contains the list of all available commands related to matrices, such as:
- Determinant[Matrix]: calculates the determinant for the given matrix.
- Invert[Matrix]: inverts the given matrix
- Transpose[Matrix]: transposes the given matrix
- ApplyMatrix[Matrix,Object]: apply affine transform given by matrix on object.
- ReducedRowEchelonForm[Matrix]: converts the matrix to a reduced row-echelon form
Comments
备注: 更多关于矩阵乘法的详细讨论请参阅官方讨论区(英文)。