QR decomposition with Givens rotations: random matrix A: 0.700 0.339 1.807 0.442 1.564 1.184 2.175 1.083 4.169 1.960 2.792 0.974 4.983 5.516 1.480 R= 5.838 6.208 3.449 0.000 1.850 -1.918 0.000 0.000 3.099 Q= 0.120 -0.219 0.314 0.076 0.592 0.664 0.372 -0.664 0.519 0.336 0.383 0.178 0.853 0.118 -0.400 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.700 0.339 1.807 0.442 1.564 1.184 2.175 1.083 4.169 1.960 2.792 0.974 4.983 5.516 1.480 test passed testing inverse random square matrix A: 0.395 0.558 1.062 1.164 1.132 1.804 2.081 0.886 3.394 inverse= -3.562 1.515 0.309 0.315 1.380 -0.832 2.101 -1.289 0.322 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