Programming Part - Linear Algorithms and Numerical Analysis | AMATH 352, Exams of Mathematics

Material Type: Exam; Class: LINR ALG & NUM ANLY; Subject: Applied Mathematics; University: University of Washington - Seattle; Term: Summer 2008;

Typology: Exams

Pre 2010

Uploaded on 03/18/2009

koofers-user-qan
koofers-user-qan 🇺🇸

10 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
AMath 352, Final Exam
Due Thursday, August 21
by 5:00pm
Instructions
Rules/Guidelines:
Work independently.
Only use basic Matlab functionality in your code. (For example, no
using the built-in polyfit to do polynomial interpolation for you.)
Feel free to re-use code from earlier in the course, but include anything
you use with your exam.
Turning in:
The envelope on the 4th floor of Guggenheim will be available for your
written work. But feel free to type up the written problems and email
them to me, if you’d rather.
Turn in your code via email, as usual.
If you have any questions, feel free to email me. I won’t say much about
mathematical issues, but if you run into any Matlab errors you can’t figure
out, I’ll be happy to help. Good luck!
Written Part
Problem 1. Find matrix representations for the following two transforma-
tions, which perform Gaussian operations on an r×rmatrix A:
1
pf3
pf4

Partial preview of the text

Download Programming Part - Linear Algorithms and Numerical Analysis | AMATH 352 and more Exams Mathematics in PDF only on Docsity!

AMath 352, Final Exam

Due Thursday, August 21

by 5:00pm

Instructions

Rules/Guidelines:

  • Work independently.
  • Only use basic Matlab functionality in your code. (For example, no using the built-in polyfit to do polynomial interpolation for you.)
  • Feel free to re-use code from earlier in the course, but include anything you use with your exam.

Turning in:

  • The envelope on the 4th floor of Guggenheim will be available for your written work. But feel free to type up the written problems and email them to me, if you’d rather.
  • Turn in your code via email, as usual.

If you have any questions, feel free to email me. I won’t say much about mathematical issues, but if you run into any Matlab errors you can’t figure out, I’ll be happy to help. Good luck!

Written Part

Problem 1. Find matrix representations for the following two transforma- tions, which perform Gaussian operations on an r × r matrix A:

  1. Swapping: Si,j^ , which swaps rows i and j.
  2. Pivoting: P i,j^ (c), which replaces A(j,:) with A(j,:)+c*A(i,:).

Problem 2. Let L be an r × r unit lower triangular matrix, in which only one column has nonzero elements below the diagonal. For example, if this column is the third, then L looks like this:

L =

L 4 , 3 1

L 5 , 3 1

Lr− 1 , 3 1 Lr, 3 1

A matrix of this form can be inverted in an especially simple fashion.

Describe how to find L−^1 , and explain in detail why your method works.

Problem 3. Let Q be a 5 × 5 matrix with orthonormal columns. Prove that if x is any 5 × 1 column vector, then ‖Qx‖ = ‖x‖.

Note: It’s probably easiest to work with the square of the length, i.e. show that ‖Qx‖^2 = ‖x‖^2. This just saves you from dealing with square roots.

Programming Part

Problem 4. If a matrix A has linearly independent columns, then it’s possible to factorize A = QL, where Q has orthonormal columns and L is lower triangular.

Write a program called myQL.m that takes a matrix A as input, and returns the two factors Q and L.

Write a program called trisolve.m that solves a tridiagonal system Ax = b as follows:

  • As inputs, takes the vectors u, v, and w that define A, along with the vector b.
  • As output, produces x that solves Ax = b.
  • Does all calculations using only the vectors u, v, w, b, and x. Specifi- cally, the full matrix A is never formed.

You may assume that the system is solvable, and that no row-swapping is needed. (This is true if, for example, A is diagonally dominant, meaning that the diagonal element in each row has larger magnitude than the sum of magnitudes of all other elements in the row.)