CASTI-89 TITANIUM · CALC89

diag(

Returns the main diagonal of a square matrix as a row vector.

Syntax

diag(expr)

Group
Matrix
Arguments
Takes one square matrix.
Availability
Included
Menu path
MATH ▸ Matrix ▸ CAS ▸ diag(

Example

InputResult
diag([1,2;3,4])[[1,4]]

Typing diag([1,2;3,4]) on the home screen and pressing ENTER returns [[1,4]].

Keystrokes on the TI-89 Titanium

2NDMATH4▶×3▼×11ENTER

The same key sequence inserts diag( in Calc89, and the AI tutor shows it step by step on the on-screen keypad.

Related commands