16-May-2025 08:42:47 svd_test MATLAB/Octave version 6.4.0 svd() computes the singular value decomposition. svd_demo(): Test the SVD for a 3 by 3 matrix A real MxN matrix A can be factored as: A = U * S * V' where U = MxM orthogonal, S = MxN zero except for diagonal, V = NxN orthogonal. The diagonal of S contains only nonnegative numbers and these are arranged in descending order. Matrix row order M = 5 Matrix column order N = 3 Choose a "random" matrix A, with integral values. The matrix A: 3 5 0 -15 11 6 19 14 7 2 10 0 13 12 2 Orthogonal factor U: -1.6829e-01 8.4242e-02 3.1338e-01 -6.3077e-01 -6.8448e-01 1.2020e-01 9.5076e-01 -2.4756e-01 -1.1677e-01 8.1730e-02 -7.6851e-01 3.3936e-03 -5.4565e-01 2.1341e-01 -2.5712e-01 -2.3943e-01 2.9424e-01 6.6362e-01 6.2100e-01 -1.7336e-01 -5.5615e-01 4.8629e-02 3.1996e-01 -3.9662e-01 6.5471e-01 Diagonal factor S: Diagonal Matrix 31.8378 0 0 0 20.1176 0 0 0 4.9636 0 0 0 0 0 0 Orthogonal factor V: -0.773240 -0.632461 -0.045748 -0.607657 0.718428 0.338547 -0.181251 0.289577 -0.939837 svd_product_test(): Test the value of |A-U*S*V'| The product U * X * V': 3.0000e+00 5.0000e+00 -1.0562e-15 -1.5000e+01 1.1000e+01 6.0000e+00 1.9000e+01 1.4000e+01 7.0000e+00 2.0000e+00 1.0000e+01 -1.3079e-15 1.3000e+01 1.2000e+01 2.0000e+00 Frobenius Norm of A, A_NORM = 37.986840 ABSOLUTE ERROR for A = U*S*V': Frobenius norm of difference A-U*S*V' = 0.000000 RELATIVE ERROR for A = U*S*V': Ratio of DIF_NORM / A_NORM = 0.000000 rank_one_test(): Compare A to the sum of R rank one matrices. R Absolute Relative Error Error 0 37.986840 1.000000 1 20.720892 0.545476 2 4.963616 0.130667 3 0.000000 0.000000 rank_one_print_test(): Print the sums of R rank one matrices. Rank R = 0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Rank R = 1: 4.1430 3.2558 0.9711 -2.9591 -2.3254 -0.6936 18.9193 14.8679 4.4348 5.8945 4.6322 1.3817 13.6914 10.7595 3.2093 Rank R = 2: 3.0712 4.4734 1.4619 -15.0562 11.4160 4.8451 18.8761 14.9169 4.4545 2.1507 8.8848 3.0958 13.0727 11.4623 3.4926 Rank R = 3: 3.0000e+00 5.0000e+00 -1.0562e-15 -1.5000e+01 1.1000e+01 6.0000e+00 1.9000e+01 1.4000e+01 7.0000e+00 2.0000e+00 1.0000e+01 -1.3079e-15 1.3000e+01 1.2000e+01 2.0000e+00 Original matrix A: 3 5 0 -15 11 6 19 14 7 2 10 0 13 12 2 Pseudoinverse of A: -1.4494e-03 -3.0528e-02 2.3587e-02 -9.5515e-03 9.0293e-03 2.7595e-02 1.4774e-02 -2.2428e-02 6.0340e-02 3.4175e-02 -5.7166e-02 5.9875e-02 1.0774e-01 -1.2006e-01 -5.6717e-02 pseudo_product_test() The following relations MUST hold: A * A+ * A = A A+ * A * A+ = A+ ( A * A+ ) is MxM symmetric; ( A+ * A ) is NxN symmetric Here are the Frobenius norms of the errors in these relationships: A * A+ * A = A 0.000000 A+ * A * A+ = A+ 0.000000 ( A * A+ ) is MxM symmetric; 0.000000 ( A+ * A ) is NxN symmetric; 0.000000 In some cases, the matrix A * A+ may be interesting (if M <= N, then it MIGHT look like the identity.) A * A+: 0.133625 -0.017714 -0.041377 0.273048 0.197961 -0.017714 0.979685 0.045934 0.086684 -0.099824 -0.041377 0.045934 0.888348 -0.177102 0.252980 0.273048 0.086684 -0.177102 0.584301 0.359804 0.197961 -0.099824 0.252980 0.359804 0.414041 In some cases, the matrix A+ * A may be interesting (if N <= M, then it MIGHT look like the identity.) A+ * A: 1.0000e+00 4.0939e-16 9.7145e-17 3.4694e-16 1.0000e+00 -1.3878e-17 -1.1172e-15 1.3878e-16 1.0000e+00 pseudo_linear_solve_test(): Given: b = A * x1 so that b is in the range of A, solve A * x = b using the pseudoinverse: x2 = A+ * b. Norm of x1 = 18.138357 Norm of x2 = 18.138357 Norm of residual = 0.000000 For N < M, most systems A*x=b will not be exactly and uniquely solvable, except in the least squares sense. Here is an example: Given b is NOT in the range of A, solve A * x = b using the pseudoinverse: x2 = A+ * b. Norm of x2 = 18.138357 Norm of residual = 0.000000 Given: b = A' * x1 so that b is in the range of A', solve A' * x = b using the pseudoinverse: x2 = A+' * b. Norm of x1 = 384.577690 Norm of x2 = 321.304642 Norm of residual = 0.000000 svd_demo(): Test the SVD for a 5 by 5 matrix A real MxN matrix A can be factored as: A = U * S * V' where U = MxM orthogonal, S = MxN zero except for diagonal, V = NxN orthogonal. The diagonal of S contains only nonnegative numbers and these are arranged in descending order. Matrix row order M = 5 Matrix column order N = 5 Choose a "random" matrix A, with integral values. The matrix A: -8 -7 4 -6 23 -2 -1 -8 -4 8 -11 4 4 24 -4 2 -5 -8 11 0 -4 -6 -3 -1 10 Orthogonal factor U: -0.668580 -0.555025 0.269902 0.225118 -0.348458 -0.272031 -0.098557 -0.422158 -0.837965 -0.189427 0.604241 -0.728194 0.225663 -0.230208 0.026589 0.177742 -0.248217 -0.797891 0.437059 -0.281328 -0.286881 -0.300593 -0.247751 0.055861 0.873408 Diagonal factor S: Diagonal Matrix 32.6870 0 0 0 0 0 25.4063 0 0 0 0 0 14.4556 0 0 0 0 0 6.1190 0 0 0 0 0 1.9160 Orthogonal factor V: 2.2916e-02 5.2559e-01 -3.0452e-01 4.9974e-01 -6.1705e-01 2.5091e-01 1.6199e-01 3.3976e-01 -6.8298e-01 -5.7351e-01 4.1533e-02 -5.7344e-02 8.6374e-01 4.9343e-01 -7.3937e-02 6.6826e-01 -6.3693e-01 -2.1057e-01 2.0068e-01 -2.5127e-01 -6.9873e-01 -5.3716e-01 -3.8025e-02 -7.6101e-03 -4.7089e-01 svd_product_test(): Test the value of |A-U*S*V'| The product U * X * V': -8.0000e+00 -7.0000e+00 4.0000e+00 -6.0000e+00 2.3000e+01 -2.0000e+00 -1.0000e+00 -8.0000e+00 -4.0000e+00 8.0000e+00 -1.1000e+01 4.0000e+00 4.0000e+00 2.4000e+01 -4.0000e+00 2.0000e+00 -5.0000e+00 -8.0000e+00 1.1000e+01 4.3867e-15 -4.0000e+00 -6.0000e+00 -3.0000e+00 -1.0000e+00 1.0000e+01 Frobenius Norm of A, A_NORM = 44.317040 ABSOLUTE ERROR for A = U*S*V': Frobenius norm of difference A-U*S*V' = 0.000000 RELATIVE ERROR for A = U*S*V': Ratio of DIF_NORM / A_NORM = 0.000000 rank_one_test(): Compare A to the sum of R rank one matrices. R Absolute Relative Error Error 0 44.317040 1.000000 1 29.925864 0.675268 2 15.813885 0.356835 3 6.411986 0.144684 4 1.915977 0.043233 5 0.000000 0.000000 rank_one_print_test(): Print the sums of R rank one matrices. Rank R = 0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Rank R = 1: -0.5008 -5.4834 -0.9077 -14.6041 15.2699 -0.2038 -2.2311 -0.3693 -5.9421 6.2130 0.4526 4.9558 0.8203 13.1987 -13.8005 0.1331 1.4578 0.2413 3.8825 -4.0595 -0.2149 -2.3529 -0.3895 -6.2665 6.5522 Rank R = 2: -7.9123e+00 -7.7677e+00 -9.9044e-02 -5.6226e+00 2.2844e+01 -1.5198e+00 -2.6367e+00 -2.2572e-01 -4.3472e+00 7.5580e+00 -9.2712e+00 1.9588e+00 1.8812e+00 2.4982e+01 -3.8627e+00 -3.1814e+00 4.3621e-01 6.0293e-01 7.8992e+00 -6.7205e-01 -4.2288e+00 -3.5900e+00 4.8466e-02 -1.4023e+00 1.0654e+01 Rank R = 3: -9.1004 -6.4421 3.2709 -6.4442 22.6961 0.3385 -4.7101 -5.4968 -3.0622 7.7901 -10.2646 3.0671 4.6988 24.2955 -3.9867 0.3309 -3.4826 -9.3595 10.3279 -0.2335 -3.1382 -4.8068 -3.0449 -0.6481 10.7906 Rank R = 4: -8.4120 -7.3829 3.9506 -6.1678 22.6856 -2.2240 -1.2081 -8.0268 -4.0912 7.8291 -10.9686 4.0292 4.0038 24.0128 -3.9760 1.6674 -5.3091 -8.0399 10.8646 -0.2538 -2.9674 -5.0403 -2.8763 -0.5795 10.7880 Rank R = 5: -8.0000e+00 -7.0000e+00 4.0000e+00 -6.0000e+00 2.3000e+01 -2.0000e+00 -1.0000e+00 -8.0000e+00 -4.0000e+00 8.0000e+00 -1.1000e+01 4.0000e+00 4.0000e+00 2.4000e+01 -4.0000e+00 2.0000e+00 -5.0000e+00 -8.0000e+00 1.1000e+01 4.3867e-15 -4.0000e+00 -6.0000e+00 -3.0000e+00 -1.0000e+00 1.0000e+01 Original matrix A: -8 -7 4 -6 23 -2 -1 -8 -4 8 -11 4 4 24 -4 2 -5 -8 11 0 -4 -6 -3 -1 10 Pseudoinverse of A: 1.1297e-01 -7.6736e-04 -4.6759e-02 1.3810e-01 -2.7793e-01 7.6849e-02 1.3759e-01 2.3035e-02 1.6456e-02 -2.7761e-01 4.8130e-02 -8.5610e-02 -3.6947e-03 -7.8867e-04 -4.3690e-02 4.9395e-02 4.1920e-04 1.6285e-02 7.2707e-02 -1.0743e-01 1.1068e-01 5.6607e-02 -4.3626e-03 7.2146e-02 -2.0159e-01 pseudo_product_test() The following relations MUST hold: A * A+ * A = A A+ * A * A+ = A+ ( A * A+ ) is MxM symmetric; ( A+ * A ) is NxN symmetric Here are the Frobenius norms of the errors in these relationships: A * A+ * A = A 0.000000 A+ * A * A+ = A+ 0.000000 ( A * A+ ) is MxM symmetric; 0.000000 ( A+ * A ) is NxN symmetric; 0.000000 In some cases, the matrix A * A+ may be interesting (if M <= N, then it MIGHT look like the identity.) A * A+: 1.0000e+00 -4.0939e-16 2.6194e-16 -2.6368e-16 8.3267e-16 -3.3307e-16 1.0000e+00 -5.5511e-17 3.3307e-16 4.4409e-16 -2.7756e-16 8.3267e-17 1.0000e+00 -1.6653e-16 6.6613e-16 -3.7470e-16 -3.9709e-16 -2.5674e-16 1.0000e+00 9.9920e-16 -4.7184e-16 -5.6899e-16 -1.4225e-16 8.3267e-17 1.0000e+00 In some cases, the matrix A+ * A may be interesting (if N <= M, then it MIGHT look like the identity.) A+ * A: 1.0000 0.0000 0 0.0000 0 -0.0000 1.0000 -0.0000 0.0000 0.0000 -0.0000 0.0000 1.0000 -0.0000 -0.0000 -0.0000 -0.0000 -0.0000 1.0000 0.0000 -0.0000 0.0000 -0.0000 0.0000 1.0000 pseudo_linear_solve_test(): Given: b = A * x1 so that b is in the range of A, solve A * x = b using the pseudoinverse: x2 = A+ * b. Norm of x1 = 27.037012 Norm of x2 = 27.037012 Norm of residual = 0.000000 Given: b = A' * x1 so that b is in the range of A', solve A' * x = b using the pseudoinverse: x2 = A+' * b. Norm of x1 = 183.575598 Norm of x2 = 183.575598 Norm of residual = 0.000000 svd_demo(): Test the SVD for a 8 by 8 matrix A real MxN matrix A can be factored as: A = U * S * V' where U = MxM orthogonal, S = MxN zero except for diagonal, V = NxN orthogonal. The diagonal of S contains only nonnegative numbers and these are arranged in descending order. Matrix row order M = 5 Matrix column order N = 8 Choose a "random" matrix A, with integral values. The matrix A: -10 5 7 -11 0 -11 -6 -2 5 2 21 7 2 -11 0 -3 6 -12 3 0 -26 0 -1 -8 -1 -1 7 -20 4 13 22 -12 5 10 6 1 -3 17 11 -5 Orthogonal factor U: 0.092152 -0.165790 0.523833 -0.558271 0.614780 0.108068 0.074897 0.825171 0.484327 -0.259292 -0.026879 0.976777 0.047357 -0.202711 0.043011 -0.861777 -0.082515 0.195206 -0.310085 -0.340988 -0.486258 0.077472 -0.065911 0.562598 0.660826 Diagonal factor S: Diagonal Matrix 39.575 0 0 0 0 0 0 0 0 30.810 0 0 0 0 0 0 0 0 27.048 0 0 0 0 0 0 0 0 22.765 0 0 0 0 0 0 0 0 11.990 0 0 0 Orthogonal factor V: Columns 1 through 6: -5.3367e-02 2.7144e-01 -5.0026e-02 4.3536e-01 -2.9533e-01 -5.3112e-01 -7.5841e-02 -3.7466e-01 1.0525e-01 2.8754e-01 7.4966e-01 -4.3484e-01 -1.5455e-01 1.0483e-01 8.1738e-01 3.0133e-01 4.7156e-02 3.5425e-01 4.1673e-01 1.3229e-01 -1.4626e-01 7.1581e-01 -9.1495e-02 1.8434e-01 -2.7122e-02 -8.3768e-01 5.1671e-02 1.4544e-01 -4.1562e-01 1.3492e-01 -5.4762e-01 4.0382e-02 -4.9622e-01 2.7878e-01 2.4110e-01 5.0098e-01 -6.2752e-01 -3.0678e-02 1.4018e-02 1.2822e-01 -3.3064e-01 -3.1625e-01 3.1533e-01 -2.3059e-01 -2.1868e-01 9.6344e-02 -6.7079e-04 -1.2180e-02 Columns 7 and 8: -5.9290e-01 1.0290e-01 3.8582e-02 -8.6920e-02 -8.0022e-02 2.6851e-01 3.9287e-01 -2.7992e-01 -2.2383e-01 -1.8078e-01 -2.3849e-01 9.2356e-02 6.0415e-01 1.1958e-01 1.1936e-01 8.8085e-01 svd_product_test(): Test the value of |A-U*S*V'| The product U * X * V': Columns 1 through 6: -1.0000e+01 5.0000e+00 7.0000e+00 -1.1000e+01 -4.4756e-15 -1.1000e+01 5.0000e+00 2.0000e+00 2.1000e+01 7.0000e+00 2.0000e+00 -1.1000e+01 6.0000e+00 -1.2000e+01 3.0000e+00 2.3752e-15 -2.6000e+01 1.8494e-15 -1.0000e+00 -1.0000e+00 7.0000e+00 -2.0000e+01 4.0000e+00 1.3000e+01 5.0000e+00 1.0000e+01 6.0000e+00 1.0000e+00 -3.0000e+00 1.7000e+01 Columns 7 and 8: -6.0000e+00 -2.0000e+00 -1.2326e-14 -3.0000e+00 -1.0000e+00 -8.0000e+00 2.2000e+01 -1.2000e+01 1.1000e+01 -5.0000e+00 Frobenius Norm of A, A_NORM = 62.521996 ABSOLUTE ERROR for A = U*S*V': Frobenius norm of difference A-U*S*V' = 0.000000 RELATIVE ERROR for A = U*S*V': Ratio of DIF_NORM / A_NORM = 0.000000 rank_one_test(): Compare A to the sum of R rank one matrices. R Absolute Relative Error Error 0 62.521996 1.000000 1 48.403063 0.774177 2 37.331139 0.597088 3 25.729640 0.411529 4 11.990015 0.191773 5 0.000000 0.000000 rank_one_print_test(): Print the sums of R rank one matrices. Rank R = 0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Rank R = 1: Columns 1 through 6: -1.9462e-01 -2.7658e-01 -5.6361e-01 1.5198e+00 -9.8912e-02 -1.9971e+00 -2.2824e-01 -3.2435e-01 -6.6096e-01 1.7823e+00 -1.1600e-01 -2.3420e+00 5.6767e-02 8.0672e-02 1.6439e-01 -4.4328e-01 2.8850e-02 5.8251e-01 1.8200e+00 2.5865e+00 5.2707e+00 -1.4213e+01 9.2499e-01 1.8676e+01 1.0270e+00 1.4594e+00 2.9740e+00 -8.0194e+00 5.2193e-01 1.0538e+01 Columns 7 and 8: -2.2885e+00 1.1500e+00 -2.6838e+00 1.3486e+00 6.6750e-01 -3.3542e-01 2.1401e+01 -1.0754e+01 1.2076e+01 -6.0681e+00 Rank R = 2: -1.5811 1.6372 -1.0991 0.8441 4.1800 -2.2034 -2.1318 2.3278 0.3981 -1.1889 -0.4191 2.0875 -2.0490 -2.2489 -2.7546 0.8165 8.2255 -11.1945 3.3193 3.5378 -25.1807 1.7978 -0.2557 -7.2749 1.1300 3.5390 5.0042 -14.5488 3.0546 18.5737 21.4793 -10.1680 1.6749 0.5652 3.2242 -7.7037 -1.4775 10.6345 12.0025 -6.6185 Rank R = 3: -2.2899 3.1285 10.4820 -1.2282 4.9121 -9.2342 -1.9332 -0.7706 -0.7184 1.1603 17.8242 -1.1768 -0.8957 -13.3242 -2.4417 -4.0644 8.1614 -11.0597 4.3662 3.3505 -25.1145 1.1622 -0.2378 -7.5551 0.8658 4.0947 9.3199 -15.3211 3.3274 15.9537 21.5534 -11.3226 1.7640 0.3775 1.7670 -7.4429 -1.5697 11.5192 11.9775 -6.2286 Rank R = 4: Columns 1 through 6: -7.8230e+00 -5.2590e-01 6.6524e+00 -1.0326e+01 3.0636e+00 -1.2777e+01 4.0818e+00 4.3306e+00 2.1147e+01 6.7155e+00 7.0787e-01 -1.0250e+01 6.1523e+00 -1.2387e+01 2.9757e+00 4.7184e-02 -2.5786e+01 -1.2434e-01 -2.2075e+00 2.0649e+00 7.1928e+00 -2.0374e+01 2.3008e+00 1.3986e+01 7.3400e+00 4.0602e+00 5.6264e+00 1.7249e+00 2.9310e-01 1.5090e+01 Columns 7 and 8: -3.5628e+00 -1.9951e+00 -1.0279e+00 -3.0021e+00 -8.2949e-01 -7.9997e+00 2.0648e+01 -1.2003e+01 1.3620e+01 -4.9947e+00 Rank R = 5: Columns 1 through 6: -1.0000e+01 5.0000e+00 7.0000e+00 -1.1000e+01 -4.4756e-15 -1.1000e+01 5.0000e+00 2.0000e+00 2.1000e+01 7.0000e+00 2.0000e+00 -1.1000e+01 6.0000e+00 -1.2000e+01 3.0000e+00 2.3752e-15 -2.6000e+01 1.8494e-15 -1.0000e+00 -1.0000e+00 7.0000e+00 -2.0000e+01 4.0000e+00 1.3000e+01 5.0000e+00 1.0000e+01 6.0000e+00 1.0000e+00 -3.0000e+00 1.7000e+01 Columns 7 and 8: -6.0000e+00 -2.0000e+00 -1.2326e-14 -3.0000e+00 -1.0000e+00 -8.0000e+00 2.2000e+01 -1.2000e+01 1.1000e+01 -5.0000e+00 Original matrix A: -10 5 7 -11 0 -11 -6 -2 5 2 21 7 2 -11 0 -3 6 -12 3 0 -26 0 -1 -8 -1 -1 7 -20 4 13 22 -12 5 10 6 1 -3 17 11 -5 Pseudoinverse of A: -2.8373e-02 1.4637e-02 3.6181e-03 2.5431e-03 -4.0579e-03 3.5265e-02 -8.0014e-03 -1.1513e-02 -2.1822e-02 4.8156e-02 9.9343e-03 3.0160e-02 2.3456e-03 3.5382e-03 1.0217e-02 -2.4819e-02 1.4205e-02 -3.0472e-03 -1.7633e-02 8.2157e-03 -1.9432e-02 1.1548e-02 -2.9235e-02 1.3046e-02 -2.1212e-02 -5.5768e-03 -1.5819e-02 -8.3408e-04 -2.4184e-03 2.8217e-02 -2.1122e-02 8.5176e-03 -2.8497e-03 2.1505e-02 -7.4550e-03 -4.6571e-03 -4.3067e-03 -8.7679e-03 -9.1206e-03 -1.5775e-03 pseudo_product_test() The following relations MUST hold: A * A+ * A = A A+ * A * A+ = A+ ( A * A+ ) is MxM symmetric; ( A+ * A ) is NxN symmetric Here are the Frobenius norms of the errors in these relationships: A * A+ * A = A 0.000000 A+ * A * A+ = A+ 0.000000 ( A * A+ ) is MxM symmetric; 0.000000 ( A+ * A ) is NxN symmetric; 0.000000 In some cases, the matrix A * A+ may be interesting (if M <= N, then it MIGHT look like the identity.) A * A+: 1.0000e+00 -4.1460e-16 -1.4225e-16 -2.0123e-16 9.7145e-17 -1.2403e-16 1.0000e+00 3.2960e-16 2.5327e-16 -1.1102e-16 6.9389e-18 -1.5959e-16 1.0000e+00 4.0246e-16 2.3592e-16 6.5919e-17 -1.0408e-17 9.7145e-17 1.0000e+00 -1.9429e-16 1.7607e-16 7.8063e-18 1.2837e-16 -5.6205e-16 1.0000e+00 In some cases, the matrix A+ * A may be interesting (if N <= M, then it MIGHT look like the identity.) A+ * A: Columns 1 through 7: 0.355794 -0.199131 0.113075 0.359645 -0.042449 0.115174 0.177933 -0.199131 0.801869 0.180471 0.040671 0.051590 0.235078 -0.150435 0.113075 0.180471 0.796001 0.041296 -0.017163 -0.221359 0.128270 0.359645 0.040671 0.041296 0.733316 0.012460 0.027197 -0.145584 -0.042449 0.051590 -0.017163 0.012460 0.899016 -0.104277 0.199512 0.115174 0.235078 -0.221359 0.027197 -0.104277 0.683605 0.291480 0.177933 -0.150435 0.128270 -0.145584 0.199512 0.291480 0.520686 -0.026337 0.066662 -0.222654 0.201915 0.187603 -0.046783 -0.181295 Column 8: -0.026337 0.066662 -0.222654 0.201915 0.187603 -0.046783 -0.181295 0.209712 pseudo_linear_solve_test(): Given: b = A * x1 so that b is in the range of A, solve A * x = b using the pseudoinverse: x2 = A+ * b. Norm of x1 = 24.535688 Norm of x2 = 21.188714 Norm of residual = 0.000000 Given: b = A' * x1 so that b is in the range of A', solve A' * x = b using the pseudoinverse: x2 = A+' * b. Norm of x1 = 231.948270 Norm of x2 = 231.948270 Norm of residual = 0.000000 For M < N, most systems A'*x=b will not be exactly and uniquely solvable, except in the least squares sense. Here is an example: Given b is NOT in the range of A', solve A' * x1 = b using the pseudoinverse: x2 = A+' * b. Norm of x2 = 0.037971 Norm of residual = 1.894887 svd_test(): Normal end of execution. 16-May-2025 08:42:47