CASTI-89 TITANIUM · CALC89
trace(
Returns the trace of a square matrix, the sum of the entries on its main diagonal.
Syntax
trace(expr)
- Group
- Matrix
- Arguments
- Takes one square matrix.
- Availability
- Included
- Menu path
- MATH ▸ Matrix ▸ CAS ▸ trace(
Example
| Input | Result |
|---|---|
| trace([[1,2][3,4]]) | 5 |
Typing trace([[1,2][3,4]]) on the home screen and pressing ENTER returns 5.
Keystrokes on the TI-89 Titanium
2NDMATH4▶×3▼×10ENTER
The same key sequence inserts trace( in Calc89, and the AI tutor shows it step by step on the on-screen keypad.
Related commands
- transpose(Returns the transpose of a matrix, with rows and columns swapped.
- unitV(Returns the unit vector in the direction of a vector, the vector divided by its length.
- .*Multiplies two matrices element by element, unlike the normal matrix product.
- .+Adds element by element: each entry of the first matrix is added to the matching entry of the second, or to a single value.
- .-Subtracts element by element: the matching entry of the second matrix, or a single value, is subtracted from each entry.
- ./Divides element by element: each entry is divided by the matching entry of the second matrix, or by a single value.
- .^Raises each entry of a matrix to a power element by element, instead of computing a matrix power.
- augment(Joins two matrices side by side, appending the columns of the second to the first.