Matrix Error
HP HP Calculator
Severity: MinorWhat Does This Error Mean?
HP calculator Matrix Error means a matrix operation cannot be performed because the dimensions of one or more matrices are incompatible. For multiplication, the number of columns in the first matrix must equal the number of rows in the second. For addition, both matrices must have identical dimensions.
Affected Models
- HP 50g
- HP Prime (G1 and G2)
- HP 35s
- HP 48G / HP 48GX
Common Causes
- Multiplying two matrices where columns of A do not equal rows of B
- Adding or subtracting matrices with different row and column counts
- Attempting to invert a non-square or singular matrix
- Applying a function to a matrix that expects a scalar input
- Incorrect matrix entry — a row with fewer entries than the others
How to Fix It
-
Check the dimensions of both matrices.
On the HP 50g: with the matrix on the stack, press SIZE to see rows and columns. For multiplication A × B to work, the number of columns in A must equal the number of rows in B. A 2×3 matrix multiplied by a 3×4 matrix is valid (result is 2×4); a 2×3 multiplied by a 2×3 is not.
-
Verify the matrix was entered correctly.
On the HP Prime, press the Matrix catalog and open the matrix. Check each row has the same number of entries. A missing or extra entry creates a ragged matrix that causes errors in all operations.
-
Check for a singular matrix when inverting.
A square matrix whose determinant is zero cannot be inverted — it is singular. Compute the determinant: on HP 50g, press DET; on HP Prime, use DET(matrix). If the result is 0, the matrix is singular and no inverse exists.
-
Transpose one matrix if the dimensions are reversed.
If you meant to multiply B × A instead of A × B, use the TRAN function to transpose one matrix. On HP 50g, press TRAN. On HP Prime, use TRN(matrix) in CAS.
Frequently Asked Questions
What is the correct order for matrix multiplication on the HP 50g?
On the HP 50g in RPN mode, enter matrix A first (stack level 2), then matrix B (stack level 1), then press the multiply key. The operation computes A × B. If you see a dimension error, your matrices are in the wrong order or have incompatible sizes.
Can the HP Prime solve systems of equations using matrices?
Yes. Enter the coefficient matrix as A and the constant vector as B, then compute A^-1 × B (or use RREF for row reduction). The HP Prime CAS includes a LINSOLVE command for solving linear systems directly.