example (ellipseswe continue example using the svd method of the module numpy linalgwe obtain the following svd matrices for matrix - - usand - - figure shows the columns of the matrix us as the two principal axes of the ellipse that is obtained by applying matrix to the points of the unit circle practical method to compute the pseudo-inverse of real-valued matrix is via the singular value decomposition usvwhere is the diagonal matrix collecting all the positive singular valuessay sr as in theorem in this caseavsuwhere sis the diagonal (pseudo-inversematrix- - we conclude with typical application of the pseudo-inverse for least-squares optimization problem from data science example (rank-deficient least squaresgiven is an data matrix xn xn xnp it is assumed that the matrix is of full row rank (all rows of are linearly independentand that the number of rows is less than the number of columnsn under this settingany solution to the equation xb provides perfect fit to the data and minimizes (to the least-squares problem argmin kxb yk ( rp in particularif bminimizes kxb yk then so does bu for all in the null space nx :{ xu }which has dimension to cope with the non-uniqueness of solutionsa possible approach is to solve instead the following optimization problemminimize bb br subject to xb that iswe are interested in solution with the smallest squared norm (orequivalentlythe smallest normthe solution can be obtained via lagrange' method (see section specificallyset (blbb (xb )and solve (bl xl (