Explain how you can solve the following problems using the QRfactorization.
(a) Find the vector x that minimizes ||Ax ? b1||^2 + ||Ax ?b2||^2 . The problem data are the m × n matrix A and two m-vectorsb1 and b2. The matrix A has linearly independent columns. If youknow several methods, give the most efficient one.
(b) Find x1 and x2 that minimize ||Ax1 ? b1||^2 + ||Ax2 ? b2||^2. The problem data are the m × n matrix A, and the m-vectors b1 andb2. The matrix A has linearly independent columns.