Author > Matrix command
A matrix is 2-dimensional array of mathematical expressions. Use the Author > Matrix command or click on the icon on the command toolbar to add a new matrix to the end of the active worksheet. After you enter the desired number of rows and columns, you are presented with a dialog box that allows you to type in and edit the elements of the matrix (see Entering Mathematical ExpressionsEntering_Mathematical_Expressions).
When satisfied with the matrix, click on the OK button or press the Enter key to add the matrix to the end of the active worksheet. Click on the Simplify button or press Alt+S to simplify the matrix before adding it to the active worksheet. Click on the Cancel button or press the Esc key to abort the command.
Alternatively, a matrix can be entered by typing in an expression of the form
[x11, x12, ..., x1n; x21, x22, ..., x2n; ...; xm1, xm2, ..., xmn]
where the xij are the elements of the matrix. The elements of a row must be separated by commas, the rows must be separated by semicolons, and the matrix must be delimited using square brackets, [ ], rather than parentheses, ( ), or braces, { }. For example,
[a, b, c; d, e, f; g, h, i]
displays as the 3 by 3 matrix
⎡ a b c ⎤
⎢ ⎥
⎢ d e f ⎥
⎢ ⎥
⎣ g h i ⎦
Internally matrices are stored as vectors of vectors, with each row vector having the same number of elements. Thus, the above 3 by 3 matrix could also be entered as
[[a, b, c], [d, e, f], [g, h, i]]
Note that when a multi-row matrix is displayed, the elements of each row are separated by at least two spaces. However when a single-row matrix is displayed, it is displayed as a vector of a vector in order to clearly distinguish it from the vector consisting of the same elements. For example, the 1 by 3 matrix
[[2·x, -5, x^2]]
displays as
⎡⎡ 2⎤⎤
⎣⎣2·x, -5, x ⎦⎦
rather than as
⎡ 2 ⎤
⎣ 2·x -5 x ⎦
To edit a matrix, highlight it and issue the Edit > Object commandEE7FDI or just press the Enter key. This command gives you the opportunity to increase or decrease the number of rows and columns of the matrix.
You can highlight the elements of matrices by clicking on them or by pressing the appropriate arrow keys (see Selecting Objects and SubexpressionsSelecting_Objects_and_Subexpressions). For example, if a matrix is highlighted, press Shift+↓ (i.e. the down arrow key) to highlight the first row of the matrix. Then press Shift+→ (i.e. the right arrow key) to highlight successive rows. Press Shift+↓ again to highlight the first element on the highlighted row. Then press Shift+→ to highlight successive elements on that row.
Other Author commandsAuthor_commands
Created with the Personal Edition of HelpNDoc: Qt Help documentation made easy