Question: Using Python..... Solving a Linear System Using the Least-Squares Method Consider the system Wb-z, for an m x m SPD matrix W. Following the class
Using Python..... 
Solving a Linear System Using the Least-Squares Method Consider the system Wb-z, for an m x m SPD matrix W. Following the class notes, write a program to find y E R(A) that minimizes without solving for b explicitly. That is, find y b, which is the projection of b onto the column space of the m x n matrix. A in the W-norm. Once your code is ready, use it to solve (approximately) Wb z for the following cases of W 1, W = 1, the m m identity matrix. 2. W = i . = diag(1, 2, , m). 3. W is the tridiagonal matrix. 2 -1 -1 2-1 W= m+I -1 -1 2 Hint: You can easily form this matrix by using the numpy.diag() function. A and z are a random 4 2 matrix and 4 x 1 vector respectively. These are made available to use as variables A and z which your code can see. Store your answers in the variables y1, y2, and y3 for the three cases respectively
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
