Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

Sure Heres a possible implementation of the rottriangular function import numpy as np def rottriangu... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Linear Algebra And Its Applications

Authors: David Lay, Steven Lay, Judi McDonald

6th Global Edition

978-1292351216, 1292351217

More Books

Students also viewed these Programming questions