## Sunday, October 16, 2016

### TI-84 Plus CE: Possible Matrix Bug? (Update 11/6/2016)

TI-84 Plus CE: Possible Matrix Bug?

Calculator:  TI-84 Plus CE
OS Version:  5.1.5.0019  (2016)

While creating a program to determine the radius of “as-built” circular alignments, I ran into a possible bug for the TI-84 Plus CE.  The program would call for the inverse of a matrix, and the 84 returned an error when I think it shouldn’t.  This blog entry will focus on the possible bug.

Determinant of a 3 x 3 Matrix

As we know, if the determinant of a matrix is 0, it is singular and an inverse for the matrix cannot be calculated. For a 3 x 3 matrix A, the determinant is calculated as:

|A| = S – U + V

Where:

S = A(1,1) * ( A(2,2) * A(3,3) – A(3,2) * A(2,3) )
U = A(1,2) * ( A(2,1) * A(3,3) – A(3,1) * A(2,3) )
V = A(1,3) * ( A(2,1) * A(3,2) – A(3,1) * A(2,2) )

Designation:  A(row, column)

The test program DET3TEST will calculate the determinant both was: first by the det function and the long calculation.

TI-84 Plus CE Program DET3TEST
Input [D]
det([D])→T
Disp "DET FUNCTION:"
Pause T
[D](1,1)*([D](2,2)*[D](3,3)-[D](2,3)*[D](3,2))→S
[D](1,2)*([D](2,1)*[D](3,3)-[D](3,1)*[D](2,3))→U
[D](1,3)*([D](2,1)*[D](3,2)-[D](2,2)*[D](3,1))→V
Disp "LONG WAY:",S-U+V

Test Results:

As expected most calculations will generate the same determinant using both methods.

Matrix:

 4 6 3 0 1 -5 -3 -2 2

Determinant Function:  67
Long Way:  67

Matrix:

 105 -262 360 435 415 360 676 330 360

Determinant Function:  -68834520
Long Way:  -68834520

Matrix:

 108 76 -2 38 45 -5 -2 -5 6

Determinant Function:  10092
Long Way:  10092

Matrix:

 2100 7584 2525 -1666 1724 -1826 5200 8 7543

Determinant Function:  2.796336659E10
Long Way:  2.796336659E10

Matrix:

 114876 4.17382e+06 -127000 -46154 82755.3 57400 2.76045e+07 -3.12e+07 3.04898e+08

Determinant Function:  1.40693245E20
Long Way:  1.40693245E20

 -1.23457e+08 10.54 48275.1 1.12467e+08 48275.1 -417758 10.554 -42700.9 3.7201e+07

Determinant Function:  -2.19786983E20
Long Way:  -2.19786983E20

 -1.23457e+08 10.54 48275.1 1.12467e+08 48275.1 -417758 10.554 -42700.9 3.7201e+07

Determinant Function:  -2.19786983E20
Long Way:  -2.19786983E20

So far, so good, as we expect.  Here is one matrix where it went wrong:

 9.70057e+08 7.76304e+08 -62136.7 7.76304e+08 6.36189e+08 -50267.6 -62136.7 -50267.6 4

Determinant Function:  0
Long Way:  3.043565238E12

Update (11/6/2016):  I recently updated the OS for the TI-84 Plus CE to version 5.2.1.0042 (2016) and tested the determinant function on this matrix again, and still got 0.

Also, in an email from Rich Grubbs, "I have verified that the following TI calculators get the result '0' when given the same matrix: TI-nspire (3.9.0.463), TI-84 keypad in the TI-nspire (2.56MP), TI-86(1.6), TI-92+ (2.05), and TI-36X Pro (Serial K-0514B)."  Thank you Rich for information!  Much appreciated!

I tested this matrix on Wolfram Alpha, HP Prime, and Casio Prizm and all got the latter answer (3.043565238E12).