—
Thin QR and a least-squares fit
Tutor me on https://mlprep.iwase.dev/item/math-la-05-qr-least-squares/. This is a screening item. If window.mlPrepAgent is available, read attempts for item math-la-05-qr-least-squares before tutoring. Inspect my attempt, keep the item ID, and do not reveal the full answer first. After a real attempt, append its record with recorded_by agent, include agent_session_id when available, and read it back.Problem
Let have columns and , and let . Find a thin QR factorization , use it to solve , and give the fitted vector and residual.
Reveal answer or reference solution
Gram-Schmidt gives and , so
The least-squares equation is . Thus and . The fitted vector and residual are
Previous attempts
Loading attempts saved in this browser…