“矩陣”的版本间的差异

来自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的版本

Accessories dictionary.png
本頁為官方文件,一般使用者無法修改,若有任何誤謬,請與官方聯絡。如欲編輯,請至本頁的開放版


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}

要在 Menu view graphics.svg 繪圖區用 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)ij 為整數)會取出矩陣第 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

備註: 更多關於矩陣乘法的詳細討論請參閱官方討論區(英文)。
© 2024 International GeoGebra Institute