15 December 2024 06:52:23 PM rref2_test(): C++ version Test rref(), which analyzes matrices using the reduced row echelon form (RREF) is_rref_test(): is_rref() reports if a matrix is in reduced row echelon format. Matrix A0: Col: 0 1 2 3 4 Row 0: 1 0 0 9 4 1: 0 0 1 0 8 2: 0 0 0 0 0 3: 0 0 0 1 0 is_rref(A0) = 0 Matrix A1: Col: 0 1 2 3 4 Row 0: 1 0 0 9 4 1: 0 0 0 1 0 2: 0 0 1 0 8 3: 0 0 0 1 0 is_rref(A1) = 0 Matrix A2: Col: 0 1 2 3 4 Row 0: 1 0 0 9 4 1: 0 1 0 2 8 2: 0 0 3 0 0 3: 0 0 0 0 0 is_rref(A2) = 0 Matrix A3: Col: 0 1 2 3 4 Row 0: 1 0 3 9 4 1: 0 1 0 2 8 2: 0 0 1 0 0 3: 0 0 0 0 0 is_rref(A3) = 0 Matrix A4: Col: 0 1 2 3 4 Row 0: 1 0 3 0 4 1: 0 1 2 0 8 2: 0 0 0 1 0 3: 0 0 0 0 0 is_rref(A4) = 1 rref_columns_test(): rref_columns() uses the reduced row echelon form (RREF) of a matrix to find the linearly independent columns. Matrix A: Col: 0 1 2 3 Row 0: 1 2 3 1 1: 2 4 9 3 2: 3 6 0 0 3: 4 8 0 2 4: 5 10 6 6 5: 6 12 6 3 6: 7 14 2 1 Number of independent columns is 3 Independent column indices 0: 0 1: 2 2: 3 Independent columns: Col: 0 1 2 Row 0: 1 3 1 1: 2 9 3 2: 3 0 0 3: 4 0 2 4: 5 6 6 5: 6 6 3 6: 7 2 1 rref_compute_test(): rref_compute() is a user-written code to compute the reduced row echelon form (RREF) of a matrix. Matrix A: Col: 0 1 2 3 4 Row 0: 1 3 0 2 6 1: -2 -6 0 -2 -8 2: 3 9 0 0 6 3: -1 -3 0 1 0 Col: 5 6 Row 0: 3 1 1: 3 1 2: 6 2 3: 9 3 rref_compute(A): Col: 0 1 2 3 4 Row 0: 1 3 0 0 2 1: 0 0 0 1 2 2: 0 0 0 0 0 3: 0 0 0 0 0 Col: 5 6 Row 0: 0 0 1: 0 2.77556e-17 2: 1 0.333333 3: 0 0 Column indices 0: 0 1: 3 2: 5 3: -1 4: -1 5: -1 6: -1 rref_determinant_test(): rref_determinant() uses the reduced row echelon form of a square matrix to compute the determinant. matrix A: Col: 0 1 2 3 Row 0: 5 7 6 5 1: 7 10 8 7 2: 6 8 10 9 3: 5 7 9 10 Estimated determinant of A = 1 rref_inverse_test(): rref_inverse() uses the reduced row echelon form of a square matrix to compute its inverse. matrix A: Col: 0 1 2 3 Row 0: 5 7 6 5 1: 7 10 8 7 2: 6 8 10 9 3: 5 7 9 10 Estimated inverse A_inv: Col: 0 1 2 3 Row 0: 68 -41 -17 10 1: -41 25 10 -6 2: -17 10 5 -3 3: 10 -6 -3 2 Product A_inv * A: Col: 0 1 2 3 Row 0: 1 5.68434e-14 -2.84217e-14 5.68434e-14 1: 0 1 7.10543e-15 0 2: -7.10543e-15 -3.19744e-14 1 -7.10543e-15 3: 5.32907e-15 1.95399e-14 7.10543e-15 1 rref_rank_test(): rref_rank() uses the reduced row echelon form of a matrix to estimate its rank. matrix A: Col: 0 1 2 3 4 Row 0: 1 3 0 2 6 1: -2 -6 0 -2 -8 2: 3 9 0 0 6 3: -1 -3 0 1 0 Col: 5 6 Row 0: 3 1 1: 3 1 2: 6 2 3: 9 3 A has rank 3 rref_solve_test(): rref_solve() uses the reduced row echelon form of a square matrix to solve a linear system. matrix A: Col: 0 1 2 3 Row 0: 5 7 6 5 1: 7 10 8 7 2: 6 8 10 9 3: 5 7 9 10 Right hand side b: Col: 0 Row 0: 57 1: 79 2: 88 3: 86 Estimated solution: Col: 0 Row 0: 1 1: 2 2: 3 3: 4 Product A * x: Col: 0 Row 0: 57 1: 79 2: 88 3: 86 rref2_test(): Normal end of execution. 15 December 2024 06:52:23 PM