### Problem Set 3

See the Guidelines. I will post on ASULearn answers to select questions I receive via messaging there or in office hours.

Problem 1:  2.1 # 26 with additional instructions:
Parts a and b: Answer the questions as in the book (note there are two of them) and show your reasoning. Be careful: A is not necessarily square here, so don't assume it is--ie you can't apply 2.3 material. Show work, annotate your reasoning, and use associativity in your reasoning.
Part c: What does this tell you about whether the columns of A span the entire space they lie in? Explain and include the formal definition of span in your annotations.

Problem 2:  2.2 # 14: Show work, annotate your reasoning, and use associativity in your reasoning.

Problem 3:  2.3 # 41 with additional instructions:
Part a: Follow the books instructions for part a, but solve these systems and find the exact solution using fractions and the inverse method, using evalf only at the end. Here are the commands for three decimals. Execute these and then modify b to compare with what happens using two decimals.
M := Matrix([[45/10, 31/10], [16/10, 11/10]]); P := MatrixInverse(M);
bthreedecimals := P.Vector([[19249/1000, 6843/1000]]);
evalf(bthreedecimals);

Part b: Follow the books instructions for part b. As listed there, to find the percent error for each coordinate (x_1 and then x_2) look at the magnitude of the difference between the values |xthree_i -xtwo_i| and divide by the value from the three decimal system (xthree_i). Show work.
Part c: As in the book, find
ConditionNumber(M);
Part d: The condition number gives a rough measure of how sensitive the solution of Ax=b can be to changes in b. The condition number measures the asymptotically worst case of how much the function can change in proportion to small changes in the argument. As a general rule of thumb, if the condition number has order ~10^k then we may lose up to k digits of accuracy. What is the order of the condition number here?

Problem 4 Hill Cipher
Assume that you intercept a number of items, as follows:
1. A question from sender a: What do you get when you take the dot product of a vector and a mountain climber?
2. A string of coded numbers as a reply: -4, 17, 1, 14, 0, 19, 7, -5, 7, -2, -3, 6, 3, 6, 11, -9, -13, 31, 19, -19, -17, 35, 5, -5, 16, -13, -11, 23, -17, 35, 19, -19
3. The last 4 letters of the decoded message: ARS_
4. The fact that a 2x2 matrix was used in the Hill Cipher
We'll investigate whether the rest of the message can be decoded as follows:

Be sure to annotate your work!

Part a: Multiply two matrix vector equations for a decoding matrix, either by-hand or in Maple:
DecodingMatrix:=Matrix([[a, b],[c,d]]);
DecodingMatrix.Vector([-17, 35]) = Vector([1, 18]);
(the vectors corresponding to AR)
DecodingMatrix.Vector([ fill in, fill in]) = Vector([ fill in , fill in ]);
... (the vector corresponding to S_ - you fill in)

Part b: From setting equal each corresponding entry in Part A, write down the 4 equations in the 4 unknowns a, b, c, d.

Part c: Solve this system (it's linear - you can solve it using a variety of methods, like a 4x5 augmented matrix with columns a b c d and an equals column, so your first row would be [-17 35 0 0 1]) to see whether you have 0, 1 or infinite solutions for a, b, c and d.

Part d: If you have solutions, put them back into DecodingMatrix:=Matrix([[a, b],[c,d]]); (careful about which numbers are in which spots) and use this to decode. In Maple, execute (twice!)

interface(rtablesize=16);
interface(rtablesize=16);
CodedMessage:=Matrix([[-4,1,0,7,7,-3,3,11,-13,19,-17,5,16,-11,-17,19],[17,14,19,-5,-2,6,6,-9,31,-19,35,-5,-13,23,35,-19]]);
DecodingMatrix.CodedMessage;

The interface command gets Maple to display more than 10 columns of a matrix and you must define the DecodingMatrix correctly using Part C. Notice also that the coded string has gone in as the column vectors of the CodedMessage.

Then translate back to letters (get it?) or explain why the system is inconsistent.
Various Maple Commands:
> with(LinearAlgebra): with(plots):
> A:=Matrix([[-1,2,1,-1],[2,4,-7,-8],[4,7,-3,3]]);
> ReducedRowEchelonForm(A);
> GaussianElimination(A);
(only for augmented matrices with unknown variables like k or a, b, c in the augmented matrix)
> ConditionNumber(A);
(only for square matrices)
> Transpose(A);
> Vector([1,2,3]);
> B:=MatrixInverse(A);
> A.B;
> A+B;
> B-A;
> 3*A;
> A^3;
> evalf(M);
decimal approximation of M
> spacecurve({[4*t,7*t,3*t,t=0..1],[-1*t,2*t,6*t,t=0..1]},color=red, thickness=2);
plot vectors as line segments in R3 (columns of matrices) to show whether the the columns are in the same plane, etc.
> implicitplot({2*x+4*y-2,5*x-3*y-1}, x=-1..1, y=-1..1);
> implicitplot3d({x+2*y+3*z-3,2*x-y-4*z-1,x+y+z-2},x=-4..4,y=-4..4,z=-4..4);
plot equations of planes in R^3 (rows of augmented matrices) to look at the geometry of the intersection of the rows (ie 3 planes intersect in a point, a line, a plane, or no common points)