QR decomposition with Givens rotations: random matrix A: 0.348 1.379 1.500 0.409 2.106 3.199 0.585 0.998 2.550 1.922 1.430 5.791 1.816 3.559 0.670 copy of A: 0.348 1.379 1.500 0.409 2.106 3.199 0.585 0.998 2.550 1.922 1.430 5.791 1.816 3.559 0.670 R= 2.761 4.034 5.676 0.000 2.403 -0.366 0.000 0.000 4.541 Q= 0.126 0.363 0.202 0.148 0.627 0.570 0.212 0.059 0.301 0.696 -0.574 0.359 0.658 0.377 -0.644 testing Q^T*Q == 1 ? Q.t*Q= 1.000 -0.000 0.000 -0.000 1.000 -0.000 0.000 -0.000 1.000 test passed testing Q*R == A ? QR= 0.348 1.379 1.500 0.409 2.106 3.199 0.585 0.998 2.550 1.922 1.430 5.791 1.816 3.559 0.670 test passed testing inverse random square matrix A: 0.773 1.615 2.048 1.235 0.339 3.342 0.693 0.022 4.286 inverse= -0.331 1.649 -1.128 0.714 -0.454 0.013 0.050 -0.264 0.415 testing A*inverse == 1 ? A*inverse= 1.000 0.000 0.000 0.000 1.000 -0.000 0.000 -0.000 1.000 test passed testing inverse*A == 1 ? inverse*A= 1.000 0.000 -0.000 -0.000 1.000 0.000 -0.000 -0.000 1.000 test passed