MTH 215 — Intro to Linear Algebra
Homework 3
Due Friday, March 13 at 11:59pm
Your work must follow the homework policies and submission guidelines in the Syllabus and on Brightspace.
- Solve the problems in this document. Your work must be handwritten (not typed).
- You need to show all your work. Correct answers without supporting work will not receive credit.
- Using techniques, theorems, definitions, etc. from material not covered in this assignment will not receive credit.
- Your work must be written on the pdf document provided. You can get another copy in class if needed.
- Submit your work as a pdf on Brightspace in the assignment titled “Homework 3-Written (pdf)”.
- Use the filename YourLastName.pdf in your submission.
- Solve the problems on the software Edfinity. Edfinity grades are computed at the semester's end.
- You do not show your work for these problems; the software only takes the final answer.
- This portion—and only this portion—is submitted entirely on Edfinity.
Both sections (in their respective formats and locations described above) are due:
Friday, March 13 at 11:59pm
Late work will not be considered!
-
Compute the product $AB$ for each of the following matrices, or state that it is not possible to do so. Show all of your steps.
- $A = \mat{cc} 1 & 0 \\ 0 & 1 \\ 0 & 0 \rix$, $B = \mat{cc} a & b \\ c & d \rix$
- $A = \mat{rrr} 1 & 0 & -1 \rix$, $B = \mat{cc} 1 & 2\\ 2 & 3 \\ 3 & 4 \rix$
- $A = \mat{r} -1 \\ 1 \\ 2 \rix$, $B = \mat{cccc} 6 & 3 & 5 & 9 \rix$
-
Let $A = \mat{cc} 0 & 3 \\ 0 & 0 \rix$.
- Compute $A^2$. Show any and all intermediate steps.
- Compute $(I+A)(I-A)$. Show any and all intermediate steps.
- Find the inverse of $I+A$, or state that $I+A$ is singular and explain why.
-
Compute the inverse of $A = \mat{rrr} 1 & 2 & 5 \\ 1 & -1 & -1 \\ 1 & 0 & 1 \rix$ by using the row operation procedure discussed in class. If $A$ is not invertible, clearly explain why and show your steps that deduce this. In either case, your work must be shown and include appropriate justifications.
-
Let $\vec{u} = \mat{c} 0 \\ 1 \rix$.
- Compute $P = \vec{u} \vec{u}^T$.
- Compute $Q = I_2 - 2P$.
- What are $P^2$, $P^T$, and $Q^2$? Explicitly compute these. Do you notice anything?
- Given the vector $\vec{x}$ below, plot the following vectors on the same graph: $P \vec{x}$, $Q \vec{x}$, $\vec{x} - P \vec{x}$.
-
(Each part below is unrelated to each other.)
- Find the matrix $B$ whose inverse is $B^{-1} = \mat{cc} 4 & 5 \\ 6 & 7 \rix$. Show all of your work.
- Find the matrix $C$ for which $(2C)^{-1} = \mat{cc} 2 & 4 \\ 0 & 1 \rix$. Show all of your work.
-
The following are row echelon forms of a matrix, where $\blacksquare$ denote nonzero values and $\ast$ could denote any number (including $0$). If possible, determine if the matrices are invertible or not. Fully explain your answers with appropriate results.
- $\mat{ccc} \blacksquare & 2 & 3 \\ 0 & 4 & 6 \\ 0 & 0 & \blacksquare \rix$
- $\mat{cccc} \blacksquare & \ast & \ast & \ast\\ 0 & 0 & \blacksquare & \ast \\ 0 & 0 & 0 & \blacksquare \\ 0 & 0 & 0 & 0 \rix$
- $\mat{cc} \blacksquare & \ast\\ 0 & \blacksquare\\ \rix$
- $\mat{cccc} \blacksquare & 0 & \ast & \ast \\ 0 & \blacksquare & 0 & \ast \\ 0 & 0 & \blacksquare & 0 \rix$
- $\mat{ccc} \ast & \ast & \blacksquare \\ 0 & \ast & \blacksquare \\ 0 & 0 & \ast \rix$
-
A secret message (of letters, say) can be encrypted into a sequence of numbers via matrix-vector multiplication in such a way that in order to decrypt the sequence back to its original message, you need to 1) know the matrix, and 2) be able to compute its inverse. If both parties have this matrix, and know how to encode a message into numbers, they can communicate in private.
First, we assign to each letter a number, where $0$ is assigned to the space, as follows.
0 _ 1 A 2 B 3 C 4 D 5 E 6 F 7 G 8 H 9 I 10 J 11 K 12 L 13 M 14 N 15 O 16 P 17 Q 18 R 19 S 20 T 21 U 22 V 23 W 24 X 25 Y 26 Z Now, we'll choose a length $n$ and break the message into row-vectors of length $1\times n$. For example, to encode the message
CLASS ON MONDAYSwith $n=3$:[3 12 1] [19 19 0] [15 14 0] [13 15 14] [4 1 25] [19 0 0] C L A S S _ O N _ M O N D A Y S Note: I had to pad the last row-vector with $0$ (spaces). It cannot be left “blank”.
Next, we'll choose any invertible matrix $A$, say \[ A \eq \mat{rrr} 1 & -2 & 2 \\ -1 & 1 & 3 \\ 1 & -1 & -4 \rix .\] The message is encrypted by multiplying each row vector times this matrix: \begin{align*} \text{Message } \cdot A & \eq \text{Scrambled Message}\\ \mat{ccc} 3 & 12 & 1 \rix A & \eq \mat{rrr} -8 & 5 & 38 \rix \\ \mat{ccc} 19 & 19 & 0 \rix A & \eq \mat{ccc} 0 & 19 & 95 \rix \\ \mat{ccc} 15 & 14 & 0 \rix A & \eq \mat{ccc} 1 & -16 & 72 \rix \\ \mat{ccc} 13 & 15 & 14 \rix A & \eq \mat{ccc} 12 & -25 & 15 \rix \\ \mat{ccc} 4 & 1 & 25 \rix A & \eq \mat{ccc} 28 & -32 & -89 \rix \\ \mat{ccc} 19 & 0 & 0 \rix A & \eq \mat{ccc} 19 & -38 & 38 \rix .\end{align*}
After converting back to a sequence of numbers, the receiver would be sent:
$-8$ 5 38 0 19 95 1 $-16$ 72 12 $-25$ 15 28 $-32$ $-89$ 19 $-38$ 38
Recall that to encrypt the message $\vec{x}$, we computed $\vec{x} \cdot A = \vec{y}$. To decrypt the message, the receiver would multiply by $A^{-1}$ to get $\vec{x} = \vec{y} A^{-1}$. Here, $\vec{x}, \vec{y}$ are row-vectors.
For example, the first row vector is decrypted via $\mat{ccc} -8 & 5 & 38 \rix \cdot A^{-1} = \mat{ccc} 3 & 12 & 1 \rix$ and by looking at the table above, the string
3 12 1corresponds to the message segmentCLA.Why split the message into chunks of size $n$? To keep the matrix $A$ small. If you don't, then you need to work with, for example, an $18 \times 18$ matrix and then compute its inverse! That's hardly advised!!
- Generate your own message to encode. Use between 15 and 40 characters (don't get too crazy). Use $n=3$ for the size of the row vectors (just like the example above).
WRITE your original message (i.e., the words) in the space below on this paper.
Now, to start encoding, convert the letters to numbers using the table above. (You don't need to write this here—see the next part).
- Open MATLAB and create a matrix $M$ (having $3$ columns) whose rows are the $1\times 3$ row vectors resulting from splitting your message up into chunks of $3$.
Remember: You may have to pad the last row with zeros to make it a $1\times 3$ vector.
For example, for the message in the example above the $M$ matrix would be \[ M \eq \mat{ccc} 3 & 12 & 1 \\ 19 & 19 & 0 \\ 15 & 14 & 0 \\ 13 & 15 & 14 \\ 4 & 1 & 25 \\ 19 & 0 & 0 \rix \qquad \text{\bf\large Yours will be different!!} .\]
- MATLAB Part Using the following matrix, and ONLY this matrix, \[ A \eq \mat{rrr} 1 & -2 & 2 \\ -1 & 1 & 3 \\ 1 & -1 & -4 \rix \] define $E = M \cdot A$ in your code. The rows of $E$ are the corresponding scrambled messages.
- Read this part very carefully! (Recommendation: Create a backup of your file now)
In your final
.mfile, you should define your unique matrix $E$ and the matrix $A$ in part (c) at the top and then have nothing else in it. Namely, do not include $M$.To get full points for this question, when I multiply your $E$ times $A^{-1}$, I should get your message. That is—full credit is awarded if and only if you correctly encrypted your message in part (a) and then it can be correctly decrypted. Recommendation: Test this before you submit the file!
- Generate your own message to encode. Use between 15 and 40 characters (don't get too crazy). Use $n=3$ for the size of the row vectors (just like the example above).
-
An important concern in the study of heat transfer is to determine the steady-state temperature distribution (i.e., long-term behavior) of a thin plate when the temperature at the boundary is known. Assume the figure represents a cross-section of a metal beam, with negligible heat flow in the direction perpendicular to the plate.
Let the variables $x_1, x_2, \ldots, x_8$ denote the temperatures at nodes 1 through 8. The temperatures at the $12$ points on the boundary are assumed to be held constant. In steady state, the temperature at a node is approximately equal to the average of the four nearest nodes (to the left, above, right, below).
The solution to the approximate steady-state heat flow problem for this plate can be written as a system of linear equations \[ A \vec{x}=\vec{b}, \qquad \vec{x}= \mat{c} x_1 \\ \vdots \\ x_8 \rix \]
- Find the $8 \times 8$ matrix $A$ and the vector $\vec{b}$.
- MATLAB Part In MATLAB, define $A$ and $\vec{b}$ as variables. Then, solve for $\vec{x}$ using
inv(A)*borA\b(either is fine). In your code, ensure $\vec{x}$ is displayed to the command window. You do not have to write $\vec{x}$ below. Submit this.mfile to Brightspace.