Skip to content

Instantly share code, notes, and snippets.

@arielb1
Last active October 22, 2015 06:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arielb1/e81615ac3df59a30a43b to your computer and use it in GitHub Desktop.
Save arielb1/e81615ac3df59a30a43b to your computer and use it in GitHub Desktop.
Do we have to correctly compute the determinant of matrices whose determinant contains components that don't fit in a long, like this 4x4 matrix:
M=
0000001 4999999 4999999 4999999
0000001 5000000 9999998 9999998
0000001 5000000 9999998 9999999
0000000 0000000 0000001 4999999
This matrix's determinant is -1 (this can be discovered by noticing that it is the product of the 3 matrices
U=
1 0 0 0
0 1 0 0
0 0 0 1
0 0 1 0
S=
1 0 0 0
1 1 0 0
0 0 1 0
1 1 0 1
A=
0000001 4999999 4999999 4999999
0000000 0000001 4999999 4999999
0000000 0000000 0000001 4999999
0000000 0000000 0000000 0000001
whose can be easily shown to be -1, 1, 1 respectively).
However, the computation of the determinant of M requires calculating 1*5000000*9999998*4999999, which is ~2^67.76 , and does not fit in a long.
@mahir1010
Copy link

you can Get Reduced Row Echelon form By simple steps and then it will be converted into the forms given below. Any Arithmetic operation on rows/columns does not change Determinant of matrix. you can subtract one row from another and can obtain the Reduced Row Echelon Form (Make sure that you are Applying functions on rows only)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment