Question: Write a function rot_triangular which takes a rectangular matrix MER where m > n as its input and outputs a list [Q,R] where Q

Write a function rot_triangular which takes a rectangular matrix M ER*** where mn as its input and outputs a

Write a function rot_triangular which takes a rectangular matrix MER where m > n as its input and outputs a list [Q,R] where Q is a rotation matrix, and R is upper triangular, such that M == Q@R. Hint: to rotate an n -dimensional vector v in the x1, x_j plane in such a way that the component is changed, and the i component is made to be 8, theta should be equal to np.arctan (v[i]/v[j]) (np.arctan computes the arctangent). Use a double for loop so that in column of the matrix, you rotate so that thej th entry (that is the diagonal entry) is changed and the i th entry is made to be zero for all i>j. This should be done over all i for j

Step by Step Solution

3.42 Rating (155 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Sure Heres a possible implementation of the rottriangular function import numpy as np def rottriangu... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!