Trident Help

Classic CAS manual · Chapter 11 of 16

Matrices and vectors

Build matrices, add and multiply them, determinants, inverses, row reduction and vector products.

11.1Type a matrix#

Use the square-bracket keys (ctrl[( and ctrl])). A matrix is a bracket holding one bracket per row: type [[1,2][3,4]] to get [1234]\begin{bmatrix}1&2\\3&4\end{bmatrix}. A single bracketed row such as [1,2,3] is a vector.

[1234]\begin{bmatrix}1&2\\3&4\end{bmatrix}
The matrix [[1,2][3,4]].
The Matrix & Vector menu. The display shows: Matrix & Vector / 1: 2×2 matrix [[a,b][c,d]] / 2: det( / 3: rref( / 4: ref( / 5: identity( / 6: Transpose ᵀ / 7: dotP(.
The Matrix & Vector menu.
Example 11.1

Add matrices

  1. Type [[1,2][3,4]]+[[1,1][1,1]].

    ctrl[(ctrl[(1,2ctrl])ctrl[(3,4ctrl])ctrl])+ctrl[(ctrl[(1,1ctrl])ctrl[(1,1ctrl])ctrl])enter
Result of the example "Add matrices" The display shows: [[1,2][3,4]]+[[1,1][1,1]] / [[2,3][4,5]].
You should see[[2,3][4,5]]
Example 11.2

Multiply by a number

  1. Type 2 × [[1,2][3,4]].

    2×ctrl[(ctrl[(1,2ctrl])ctrl[(3,4ctrl])ctrl])enter
Result of the example "Multiply by a number" The display shows: 2·[[1,2][3,4]] / [[2,4][6,8]].
You should see[[2,4][6,8]]
Example 11.3

Multiply matrices

  1. Type [[1,2][3,4]]·[[0,1][1,0]].

    ctrl[(ctrl[(1,2ctrl])ctrl[(3,4ctrl])ctrl])×ctrl[(ctrl[(0,1ctrl])ctrl[(1,0ctrl])ctrl])enter
Result of the example "Multiply matrices" The display shows: [[1,2][3,4]]·[[0,1][1,0]] / [[2,1][4,3]].
You should see[[2,1][4,3]]
Example 11.4

Store a matrix

  1. Store m and multiply it by a column.

    m:=ctrl[(ctrl[(2,1ctrl])ctrl[(1,3ctrl])ctrl])enterm×ctrl[(ctrl[(5ctrl])ctrl[(7ctrl])ctrl])enter
Result of the example "Store a matrix" The display shows: m:=[[2,1][1,3]] / [[2,1][1,3]] / m·[[5][7]] / [[17][26]].
You should see[[17][26]]

11.2Determinant, inverse and transpose#

det⁡[abcd]=ad−bc\det\begin{bmatrix}a&b\\c&d\end{bmatrix}=ad-bc
The 2×2 determinant.
Example 11.5

Determinant

  1. Type det([[1,2][3,4]]).

    det(ctrl[(ctrl[(1,2ctrl])ctrl[(3,4ctrl])ctrl]))enter
Result of the example "Determinant" The display shows: det([[1,2][3,4]]) / -2.
You should see-2
Example 11.6

Symbolic determinant

  1. Type det([[a,b][c,d]]).

    det(ctrl[(ctrl[(a,bctrl])ctrl[(c,dctrl])ctrl]))enter
Result of the example "Symbolic determinant" The display shows: det([[a,b][c,d]]) / a·d-b·c.
You should seea·d-b·c
Example 11.7

Inverse

  1. Type [[1,2][3,4]] ^ (−1).

    ctrl[(ctrl[(1,2ctrl])ctrl[(3,4ctrl])ctrl])^((−)1)enter
Result of the example "Inverse" The display shows: [[1,2][3,4]]^((-1)) / [[-2,1][3/2,-1/2]].
You should see[[-2,1][3/2,-1/2]]
Example 11.8

Inverse of a stored matrix

  1. Store m, then m^(−1).

    m:=ctrl[(ctrl[(2,1ctrl])ctrl[(1,3ctrl])ctrl])enterm^((−)1)enter
Result of the example "Inverse of a stored matrix" The display shows: m:=[[2,1][1,3]] / [[2,1][1,3]] / m^((-1)) / [[3/5,-1/5][-1/5,2/5]].
You should see[[3/5,-1/5][-1/5,2/5]]
Example 11.9

Transpose

  1. Type the matrix, then choose Transpose from the Matrix menu (menu, 7, 6).

    ctrl[(ctrl[(1,2ctrl])ctrl[(3,4ctrl])ctrl])menu76enter
Result of the example "Transpose" The display shows: [[1,2][3,4]]ᵀ / [[1,3][2,4]].
You should see[[1,3][2,4]]
Example 11.10

Identity matrix

  1. Type identity(3).

    identity(3)enter
Result of the example "Identity matrix" The display shows: identity(3) / [[1,0,0][0,1,0][0,0,1]].
You should see[[1,0,0][0,1,0][0,0,1]]

11.3Row reduce and solve a linear system#

rref( gives the reduced row echelon form; ref( gives the row echelon form. To solve a system, write its augmented matrix and use rref.

Example 11.11

Solve 2x+y=5, x−y=1 with rref

  1. Type rref([[2,1,5][1,−1,1]]). The last column holds x=2, y=1.

    rref(ctrl[(ctrl[(2,1,5ctrl])ctrl[(1,(−)1,1ctrl])ctrl]))enter
Result of the example "Solve 2x+y=5, x−y=1 with rref" The display shows: rref([[2,1,5][1,-1,1]]) / [[1,0,2][0,1,1]].
You should see[[1,0,2][0,1,1]]
Example 11.12

Reduced row echelon form

  1. Type rref([[1,2,3][4,5,6]]).

    rref(ctrl[(ctrl[(1,2,3ctrl])ctrl[(4,5,6ctrl])ctrl]))enter
Result of the example "Reduced row echelon form" The display shows: rref([[1,2,3][4,5,6]]) / [[1,0,-1][0,1,2]].
You should see[[1,0,-1][0,1,2]]
Example 11.13

Row echelon form

  1. Type ref([[1,2,3][4,5,6]]).

    ref(ctrl[(ctrl[(1,2,3ctrl])ctrl[(4,5,6ctrl])ctrl]))enter
Result of the example "Row echelon form" The display shows: ref([[1,2,3][4,5,6]]) / [[1,5/4,3/2][0,1,2]].
You should see[[1,5/4,3/2][0,1,2]]
Example 11.14

Join matrices side by side

  1. Type augment([[1,2][3,4]],[[5][6]]).

    augment(ctrl[(ctrl[(1,2ctrl])ctrl[(3,4ctrl])ctrl]),ctrl[(ctrl[(5ctrl])ctrl[(6ctrl])ctrl]))enter
Result of the example "Join matrices side by side" The display shows: augment([[1,2][3,4]],[[5][6]]) / [[1,2,5][3,4,6]].
You should see[[1,2,5][3,4,6]]

11.4Dot product, cross product and size#

a⃗⋅b⃗=a1b1+a2b2+a3b3,∥v⃗∥=v12+v22+⋯\vec a\cdot\vec b=a_1b_1+a_2b_2+a_3b_3,\qquad \lVert\vec v\rVert=\sqrt{v_1^2+v_2^2+\cdots}
Dot product and norm.
Example 11.15

Dot product

  1. Type dotP([1,2,3],[4,5,6]).

    dotp(ctrl[(1,2,3ctrl]),ctrl[(4,5,6ctrl]))enter
Result of the example "Dot product" The display shows: dotp([1,2,3],[4,5,6]) / 32.
You should see32
Example 11.16

Cross product

  1. Type crossP([1,2,3],[4,5,6]).

    crossp(ctrl[(1,2,3ctrl]),ctrl[(4,5,6ctrl]))enter
Result of the example "Cross product" The display shows: crossp([1,2,3],[4,5,6]) / [[-3,6,-3]].
You should see[[-3,6,-3]]
Example 11.17

Length of a vector

  1. Type norm([3,4]).

    norm(ctrl[(3,4ctrl]))enter
Result of the example "Length of a vector" The display shows: norm([3,4]) / 5.
You should see5

11.5Size of a matrix#

Example 11.18

Dimensions

  1. Type dim([[1,2,3][4,5,6]]).

    dim(ctrl[(ctrl[(1,2,3ctrl])ctrl[(4,5,6ctrl])ctrl]))enter
Result of the example "Dimensions" The display shows: dim([[1,2,3][4,5,6]]) / {2,3}.
You should see{2,3}
Example 11.19

Row count

  1. Type rowDim(...).

    rowdim(ctrl[(ctrl[(1,2,3ctrl])ctrl[(4,5,6ctrl])ctrl]))enter
Result of the example "Row count" The display shows: rowdim([[1,2,3][4,5,6]]) / 2.
You should see2
Example 11.20

Column count

  1. Type colDim(...).

    coldim(ctrl[(ctrl[(1,2,3ctrl])ctrl[(4,5,6ctrl])ctrl]))enter
Result of the example "Column count" The display shows: coldim([[1,2,3][4,5,6]]) / 3.
You should see3

TI-Nspire CX CAS is a trademark of Texas Instruments Incorporated. Trident Calculator is an independent product by South View Studios and is not affiliated with, sponsored by or endorsed by Texas Instruments. The name is used only to describe the kind of calculator this model resembles; Trident's names, keys, display, fonts and software are its own clean-room design.