Trident Help

RPN Power 48 manual · Chapter 12 of 19

Vectors and matrices

Type vectors and matrices, take determinants and inverses, multiply, solve linear systems, and use dot and cross products.

12.1Type a vector or matrix#

Left shift 9 gives square brackets. A vector is one pair of brackets with numbers separated by spaces. A matrix is a pair of brackets around one inner pair per row. The easiest way to type a matrix: press left shift 9 twice, type the first row, press right shift ▶ to step over the inner bracket, press left shift 9 again for the next row, and ENTER.

Example 12.1

Type a vector

  1. Left shift 9, then 1 2 3, ENTER.

    ◀[ ]91SPC2SPC3ENTER
Result of the example "Type a vector" The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1:                      [ 1 2 3 ].
You should see[ 1 2 3 ]
Example 12.2

Type a 2 by 2 matrix

  1. Two bracket pairs for the rows.

    ◀[ ]9◀[ ]91SPC2▶▶◀[ ]93SPC4ENTER
Result of the example "Type a 2 by 2 matrix" The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1:              [[ 1 2 ] [ 3 4 ]].
You should see[[ 1 2 ] [ 3 4 ]]

12.2The MATRX menu#

MATRX page 1: →ARRY, ARRY→, DET, INV, TRN, RREF. The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1: / →ARRY ARRY→ DET   INV  TRN  RREF .
MATRX page 1: →ARRY, ARRY→, DET, INV, TRN, RREF.
MATRX page 2: CON, IDN, SIZE, DOT, CROSS, ABS. The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1: /  CON   IDN  SIZE  DOT CROSS  ABS .
MATRX page 2: CON, IDN, SIZE, DOT, CROSS, ABS.
MATRX page 3: →V2, →V3, V→, GET, PUT, NEG. The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1: /  →V2   →V3   V→   GET  PUT   NEG .
MATRX page 3: →V2, →V3, V→, GET, PUT, NEG.
CommandWhat it does
→ARRY, ARRY→Build an array from stack objects, or explode it.
DETDeterminant of a square matrix.
INVInverse.
TRNTranspose.
RREFReduce to row-echelon form.
CON, IDNConstant matrix, identity matrix.
SIZEThe dimensions as a list.
DOT, CROSSDot and cross product of vectors.
ABSLength of a vector.
→V2, →V3, V→Make a 2D or 3D vector from numbers, or explode one.
GET, PUTRead or replace one element.

12.3Determinant, inverse and transpose#

det⁡(1234)=−2,A−1=(−211.5−0.5)\det\begin{pmatrix}1&2\\3&4\end{pmatrix}=-2,\quad A^{-1}=\begin{pmatrix}-2&1\\1.5&-0.5\end{pmatrix}
Example 12.3

Determinant

  1. Press DET (third key).

    ◀[ ]9◀[ ]91SPC2▶▶◀[ ]93SPC4ENTER◀MATRXVARF3
Result of the example "Determinant" The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1:                             -2 / →ARRY ARRY→ DET   INV  TRN  RREF .
You should see1: -2
Example 12.4

Inverse

  1. Press INV (fourth key).

    ◀[ ]9◀[ ]91SPC2▶▶◀[ ]93SPC4ENTER◀MATRXVARF4
Result of the example "Inverse" The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1:         [[ -2 1 ] [ 1.5 -.5 ]] / →ARRY ARRY→ DET   INV  TRN  RREF .
You should see[[ -2 1 ] [ 1.5 -.5 ]]
Example 12.5

Transpose

  1. Press TRN (fifth key).

    ◀[ ]9◀[ ]91SPC2▶▶◀[ ]93SPC4ENTER◀MATRXVARF5
Result of the example "Transpose" The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1:              [[ 1 3 ] [ 2 4 ]] / →ARRY ARRY→ DET   INV  TRN  RREF .
You should see[[ 1 3 ] [ 2 4 ]]
Example 12.6

Size

  1. SIZE is the third key of page 2.

    ◀[ ]9◀[ ]91SPC2▶▶◀[ ]93SPC4ENTER◀MATRXVARNXTF3
Result of the example "Size" The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1:                        { 2 2 } /  CON   IDN  SIZE  DOT CROSS  ABS .
You should see{ 2 2 }
Example 12.7

Identity matrix

  1. Type 2 and press IDN (page 2, second key).

    2◀MATRXVARNXTF2
Result of the example "Identity matrix" The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1:              [[ 1 0 ] [ 0 1 ]] /  CON   IDN  SIZE  DOT CROSS  ABS .
You should see[[ 1 0 ] [ 0 1 ]]

See also Enter and multiply matricesMatrix determinant and inverse

12.4Multiply matrices and solve systems#

Use +, − and × on matrices of matching size. Adding or subtracting a number and a matrix is Bad Argument Type; multiply or divide by a number to scale. A matrix times a vector gives a vector. ÷ with a vector on level 2 and a matrix on level 1 solves the linear system.

Ax=b  ⇒  x=b÷AA\mathbf{x}=\mathbf{b}\;\Rightarrow\;\mathbf{x}=\mathbf{b}\div A
Example 12.8

Square a matrix

  1. Copy the matrix with ENTER and multiply.

    ◀[ ]9◀[ ]91SPC2▶▶◀[ ]93SPC4ENTERENTER×
Result of the example "Square a matrix" The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1:           [[ 7 10 ] [ 15 22 ]].
You should see[[ 7 10 ] [ 15 22 ]]
Example 12.9

Scale a matrix

  1. Multiply by 2.

    ◀[ ]9◀[ ]91SPC2▶▶◀[ ]93SPC4ENTER2×
Result of the example "Scale a matrix" The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1:              [[ 2 4 ] [ 6 8 ]].
You should see[[ 2 4 ] [ 6 8 ]]
Example 12.10

Multiply a matrix and a vector

  1. Type the vector [ 1 0 ] and multiply.

    ◀[ ]9◀[ ]91SPC2▶▶◀[ ]93SPC4ENTER◀[ ]91SPC0ENTER×
Result of the example "Multiply a matrix and a vector" The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1:                        [ 1 3 ].
You should see[ 1 3 ]
Example 12.11

Solve a linear system

x+2y=53x+4y=6\begin{aligned}x+2y&=5\\3x+4y&=6\end{aligned}
  1. Type the right-hand side [ 5 6 ] first, then the coefficient matrix, then divide.

    ◀[ ]95SPC6ENTER◀[ ]9◀[ ]91SPC2▶▶◀[ ]93SPC4ENTER÷
Result of the example "Solve a linear system" The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1:                     [ -4 4.5 ].
You should see[ -4 4.5 ]

12.5Dot product, cross product and length#

a⋅b=a1b1+a2b2+a3b3\mathbf{a}\cdot\mathbf{b}=a_1b_1+a_2b_2+a_3b_3
Example 12.12

Dot product

  1. Type [ 1 2 3 ] and [ 4 5 6 ], press DOT (page 2, fourth key).

    ◀[ ]91SPC2SPC3ENTER◀[ ]94SPC5SPC6ENTER◀MATRXVARNXTF4
Result of the example "Dot product" The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1:                             32 /  CON   IDN  SIZE  DOT CROSS  ABS .
You should see1: 32
Example 12.13

Cross product

  1. CROSS is the fifth key.

    ◀[ ]91SPC2SPC3ENTER◀[ ]94SPC5SPC6ENTER◀MATRXVARNXTF5
Result of the example "Cross product" The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1:                    [ -3 6 -3 ] /  CON   IDN  SIZE  DOT CROSS  ABS .
You should see[ -3 6 -3 ]
Example 12.14

Length of a vector

  1. Type [ 3 4 ], press ABS (page 2, sixth key).

    ◀[ ]93SPC4ENTER◀MATRXVARNXTF6
Result of the example "Length of a vector" The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1:                              5 /  CON   IDN  SIZE  DOT CROSS  ABS .
You should see1: 5

HP 48 and HP 50g is a trademark of HP Inc.. Trident Calculator is an independent product by South View Studios and is not affiliated with, sponsored by or endorsed by HP. 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.