Math 4133 - Linear Algebra
Final Exam - 2016.05.02
YOUR NAME HERE
(remember Alt+7 gives a text bracket)

1. Consider the following system of equations:

3*w - a*x + 5*y - 6*z = 27,
5*w + 4*x - 2*y - b*z = 3,
(b-a)*w + x + y - 2*z = 6.

Find values of {a,b} such that the above system of equations has a solution {w, x, y, z} = {1, -1, 2, -2}.

2. Define
P = (({{0, 0, 1, 0}, {1, 0, 0, 0}, {0, 0, 0, 1}, {0, 1, 0, 0}}))
Diagonalize by first computing D and Q. Then verify P = (QDQ^(-1)).

P = (({{0, 0, 1, 0}, {1, 0, 0, 0}, {0, 0, 0, 1}, {0, 1, 0, 0}}));

3. Find a relationship between Q and (Q^(-1))  from the previous problem.

4. Consider the following set of 81 points:

PtsList = {{-4.1,-3.9,-83.8},{-4.2,-3.9,-49.1},{-3.9,-2.2,-28.3},{-4.1,-1.3,-21.1},{-4.2,0.1,-28.2},{-3.8,0.9,-49.3},{-4.1,1.7,-83.8},{-4.1,3.1,-133.9},{-4.1,4.2,-196.1},{-3.2,-3.7,-86.8},{-3.1,-3.2,-47.4},{-3.1,-2.2,-21.9},{-2.7,-1.2,-12.2},{-3.1,0.4,-14.7},{-2.8,0.7,-31.8},{-2.7,1.7,-62.9},{-3.1,3.5,-109.1},{-3.1,4.1,-167.3},{-2.2,-3.8,-93.7},{-2.1,-2.8,-50.3},{-2.1,-1.8,-21.7},{-2.1,-1.3,-7.1},{-2.2,0.2,-5.8},{-2.1,0.8,-18.7},{-2.1,2.2,-44.9},{-2.1,3.1,-86.7},{-2.1,4.1,-141.1},{-1.4,-3.8,-105.1},{-1.1,-2.8,-57.4},{-1.1,-1.8,-24.7},{-1.1,-1.3,-4.8},{-1.0,0.2,-1.3},{-1.1,1.4,-10.1},{-1.2,2.5,-34.6},{-1.1,3.2,-71.6},{-1.1,4.2,-121.2},{0.1,-4.1,-120.9},{-0.4,-2.8,-68.3},{0.1,-2.1,-31.7},{0.1,-1.3,-8.7},{0.2,-0.2,0.3},{0.2,1.4,-5.2},{0.2,2.1,-23.7},{0.2,3.1,-56.7},{0.1,3.7,-103.8},{1.2,-4.2,-138.7},{1.5,-3.2,-83.4},{1.5,-2.5,-42.7},{1.2,-1.2,-16.4},{1.2,0.1,-3.8},{1.6,1.7,-4.2},{1.1,2.4,-18.2},{1.3,2.6,-47.4},{1.6,3.6,-90.7},{2.1,-3.9,-161.8},{2.7,-2.9,-101.9},{2.1,-2.1,-58.1},{2.2,-1.3,-27.5},{1.9,-0.2,-9.6},{2.6,1.1,-7.1},{2.2,2.3,-18.9},{1.9,3.1,-42.8},{2.2,4.1,-82.2},{3.1,-4.6,-189.1},{3.5,-3.1,-126.1},{3.2,-2.1,-77.1},{3.2,-1.1,-42.1},{3.2,-0.2,-21.5},{2.6,1.2,-13.7},{3.1,1.8,-20.7},{3.1,3.5,-42.1},{3.2,4.1,-76.7},{4.2,-3.8,-220.1},{4.6,-3.2,-153.1},{4.1,-1.8,-100.7},{4.1,-1.1,-61.3},{4.1,0.7,-35.1},{4.7,1.2,-25.9},{4.2,2.5,-28.2},{4.7,3.2,-45.7},{4.3,4.5,-75.8}};

(a) First, plot these points using the command:  ListPointPlot3D[PtsList, PlotStyle->{Black,PointSize[0.02]}, AxesLabel->{“x”,”y”,”z”}].

PtsPlot = ListPointPlot3D[PtsList, PlotStyle->{Black,PointSize[0.02]}, AxesLabel->{"x","y","z"}]

(b) Next, find the surface of best fit of the form:

z = a*(x^2) + b*x*y + c*(y^2) + d*x + e*y +f

Here, the unknown constants are {a,b,c,d,e,f}.

(c) Plot both the points and solution on one graph.

(d)  Lastly, compute the error in using the approximate surface versus the actual data.  Also, compute the relative error by taking this value and dividing by the norm of the true solution vector.

5. Consider the following set of 17 points:

ApproxQuarticPtsList = {{-4.21,-6.43},{-3.51,-5.37},{-3.1,-3.68},{-2.5`,-1.79},{-2.1,-0.023},{-1.52,1.39},{-1.1,2.21},{-0.48,2.078},{0.05,1.17},{0.51,-0.97},{1.3,-4.071},{1.51,-8.319},{2.07,-13.61},{2.53,-19.92},{3.05,-27.092},{3.51,-34.912},{4.07,-43.28}};

Find only the y-intercept for the quartic of best fit y= (ax^4) + (bx^3)+(cx^2)+dx+e. You are not allowed to find any other unknowns a, b, c, or d.

6. Consider the set of all continuous functions on the closed interval [-2,5], which is denoted by the symbol C[-2,5], and the set B = {1, x, (x^2), (x^3), (x^4), (x^5)} and the subspace spanned by the set B.  Furthermore, let the dot product of two functions (vectors) in C[-2,5] be defined by the following integral (similar to HW problems from Chapter 8):

                                              f(x)* g(x) = (∫_(-2)^5)f(x)g(x) + f'(x)g'(x)dx
                                              
 (a) Perform the Gram-Schmidt Orthonormalization Process on the basis B, and verify this result by computing the dot product matrix W. Hint, you may wish to use NIntegrate as opposed to Integrate.

(Subscript[f, 1])= 1; (Subscript[f, 2])= x;(Subscript[f, 3]) = x^2; (Subscript[f, 4]) = x^3;(Subscript[f, 5]) = x^4;(Subscript[f, 6])= x^5;

(b) Project the function G(x) = (Tanh^2)(4x-1) onto the subspace spanned by the set of orthonormal function found in (a).

(c) Graph both G(x) and the projection computed in part (b).

7. Find the equation of the plane spanned by the two vectors (OverVector[(Subscript[u, 1])]) = <1,2,3> and (OverVector[(Subscript[u, 2])]) = <-1,1,0>.

u1= {1,2,3};
u2 = {-1,1,0};

8. Consider the following five vectors:
(OverVector[(Subscript[u, 1])]) = <3,4,-1,3,2,5,6,7>, 
(OverVector[(Subscript[u, 2])]) = <1,-1,0,2,-5,2,-3,1>,
 (OverVector[(Subscript[u, 3])])= <-2,1,1,1,0,8,-3,-2> ,
(OverVector[(Subscript[u, 4])]) =  <-5,9,2,2,12,25,3,-1>,
 (OverVector[(Subscript[u, 5])]) =  <13,4,-5,5,-1,-12,18,21>. 
(a) Compute the dimension of the subspace spanned by the set {(OverVector[(Subscript[u, 1])]),  (OverVector[(Subscript[u, 2])]),  (OverVector[(Subscript[u, 3])]),  (OverVector[(Subscript[u, 4])]),  (OverVector[ (Subscript[u, 5])])}.

(Subscript[u, 1]) = {3,4,-1,3,2,5,6,7};
(Subscript[u, 2]) = {1,-1,0,2,-5,2,-3,1};
(Subscript[u, 3]) = {-2,1,1,1,0,8,-3,-2};
(Subscript[u, 4]) = {-5,9,2,2,12,25,3,-1};
(Subscript[u, 5]) ={13,4,-5,5,-1,-12,18,21};

(b) Find a basis for the subspace spanned by the set {(OverVector[(Subscript[u, 1])]),  (OverVector[(Subscript[u, 2])]),  (OverVector[(Subscript[u, 3])]),  (OverVector[(Subscript[u, 4])]),  (OverVector[ (Subscript[u, 5])])}.

(c) project the vector (OverVector[w]) = <1,1,1,1,1,1,1,1> onto the subspace generated by the basis from (b).

9. Given the following set of 33 points, pick no more than 3 functions {(Subscript[f, 1]), (Subscript[f, 2]), (Subscript[f, 3])} (which includes the constant function)  and fit the data to a curve of the form F(x) = a (Subscript[f, 1])(x) + b (Subscript[f, 2])(x) + c (Subscript[f, 3])(x).  Be sure to justify why you have chosen the functions used to fit the data.

ApproxGuessPts = {{-1.1,0.99},{-0.72,1.42},{-0.51,1.92},{-0.24,2.45},{0.05,3.21},{0.24,3.54},{0.51,4.079},{0.76,4.58},{1.01,5.04},{1.22,5.44},{1.51,5.79},{1.74,6.08},{2.01,6.31},{2.26,6.47},{2.51,6.59},{2.74,6.68},{3.02,6.74},{3.22,6.79},{3.51,6.84},{3.74,6.93},{4.01,7.04},{4.24,7.21},{4.51,7.42},{4.75,7.71},{5.02,8.04},{5.23,8.44},{5.51,8.89},{5.76,9.39},{5.99,9.92},{6.23,10.46},{6.51,11.015},{6.74,11.55},{7.01,12.056}};