(HP71B) integer determinant
02-17-2024, 05:03 PM
Post: #3
 Albert Chan Senior Member Posts: 2,703 Joined: Jul 2018
RE: (HP71B) integer determinant
It is hard to see why delayed division (by 1 step) preserve integer.

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
 « Next Oldest | Next Newest »

 Messages In This Thread (HP71B) integer determinant - Albert Chan - 02-16-2024, 10:36 PM RE: (HP71B) integer determinant - Albert Chan - 02-16-2024, 11:16 PM RE: (HP71B) integer determinant - Albert Chan - 02-17-2024 05:03 PM RE: (HP71B) integer determinant - robve - 02-18-2024, 03:05 PM RE: (HP71B) integer determinant - Albert Chan - 02-18-2024, 03:33 PM RE: (HP71B) integer determinant - J-F Garnier - 02-21-2024, 08:23 AM RE: (HP71B) integer determinant - Albert Chan - 02-21-2024, 01:31 PM

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