Post Reply 
(HP71B) integer determinant
02-17-2024, 05:03 PM
Post: #3
RE: (HP71B) integer determinant
It is hard to see why delayed division (by 1 step) preserve integer.
Perhaps we can start with smaller 3×3 matrix

Cas> m := [[a11,a12,a13],[a21,a22,a23],[a31,a32,a33]]

Say we pick a11 as pivot, and we clear pivot column.

Cas> m[2] := a11*m[2] - a21*m[1]
Cas> m[3] := a11*m[3] - a31*m[1]

\(\left(\begin{array}{ccc}
a_{11} & a_{12} & a_{13} \\
0 & a_{11}\; a_{22}- a_{12}\; a_{21} & a_{11}\; a_{23} - a_{13}\; a_{21} \\
0 & a_{11}\; a_{32}- a_{12}\; a_{31} & a_{11}\; a_{33} - a_{13}\; a_{31}
\end{array}\right) \)

This new matrix still have integer entries, with determinant scaled up by pivot^2
If we divide by pivot right the way, entries may have fractional part.

If we remove pivot row/col, new matrix have determinant scaled up by pivot^1
Fractional part issue remains, which is easily shown setting pivot = 0

Cas> m := subMat(m, [2,2], [3,3])
Cas> m(a11=0)

\(\left(\begin{array}{ccc}
- a_{12}\; a_{21} & - a_{13}\; a_{21} \\
- a_{12}\; a_{31} & - a_{13}\; a_{31}
\end{array}\right) \)

However, if we delay division by 1 step, cells are divisible by previous pivot.

(-a12*a21) * (-a13*a31) - (-a12*a31) * (-a13*a21) = 0
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(HP71B) integer determinant - Albert Chan - 02-16-2024, 10:36 PM
RE: (HP71B) integer determinant - Albert Chan - 02-17-2024 05:03 PM
RE: (HP71B) integer determinant - robve - 02-18-2024, 03:05 PM



User(s) browsing this thread: 3 Guest(s)