Question: Write a function ref_triangular which uses reflections to turn an m X n matrix M into an upper triangular matrix. The output should be

Write a function ref_triangular which uses reflections to turn an m X n matrix M into an upper triangular 

Write a function ref_triangular which uses reflections to turn an m X n matrix M into an upper triangular matrix. The output should be a list [Q,R] where is a product of reflections and R is upper triangular such that M == Q@R. At the start of the function, set R= M. copy(). On the i th step of a for loop, we should apply a reflection R, such that if the j th column is x = Mc., then R,x=y where R[0./ where y = I R[J-1.j] I 0 so we use a reflection with normal vector r=RE: J-R[0, J1-... - RJ-1./1 v = R[:.jl - y. We use this particular form for y so that at the jth step, we do not mess up the lower diagonal part we already created in previous steps.

Step by Step Solution

3.40 Rating (166 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!