Today we finish Section 8.1 and start Section 3.6. Continue reading Section 3.6. Work through suggested exercises.
No homework this week.
Math Help Centre: M-F 12:30-5:30 in PAB48/49 and online 6pm-8pm.
My next office hour is today 3:30-4:20 in MC130.
The midterm is on Saturday, November 9, 2-4pm. It will cover until the end of Section 3.5. Old midterms are on OWL.
Midterm Review sessions: Nov 6 and 7, 4:30-5:30pm, UCC146. Bring questions.
Example: $[4, 6, 8] + [6, 6, 6] = [0, 2, 4]$, $3[4,6,8] = [2, 8, 4]$, and $[1,2,3] \cdot [4,5,6] = 1 + 10 + 18 = 9$ in $\Z_{10}^3$.
To create a code, you choose $m$ (which determines the allowed digits), $n$ (the number of digits in a code word), and a check vector $\vc \in \Z_m^n$. Then the valid words $\vv$ are those with $\vc \cdot \vv = 0$. If $\vc$ ends in a $1$, then you can always choose the last digit of $\vv$ to make it valid.
Examples were given last lecture.
Question: The Dan code uses vectors in $\Z_4^3$ with check vector $\vc = [3,2,1]$. Find the check digit $d$ in the code word $\vv = [2, 2, d]$.
Solution: We compute $$ \kern-4ex \begin{aligned} \vc \cdot \vv = [3,2,1]\cdot [2,2,d] &= 3 \cdot 2 + 2 \cdot 2 + 1 \cdot d \\ &= 10 + d = 2 + d \pmod{4} \end{aligned} $$ To make $\vc \cdot \vv = 0 \pmod{4}$, we choose $d = 2$.
Note: These kinds of codes can only reliably detect one error, but more sophisticated codes can detect multiple errors. There are even error-correcting codes, which can correct multiple errors in a transmission without needing it to be resent. In fact, you can drill small holes in a CD, and it will still play the entire content perfectly.
Example: If $ A = \bmat{rr} 0 & 1 \\ 2 & 3 \\ 4 & 5 \emat $ then $$ \kern-9ex T_A\left(\coll {\!-1} 2\right) = A \coll {\!-1} 2 = \bmat{rr} 0 & 1 \\ 2 & 3 \\ 4 & 5 \emat \coll {-1} 2 = -1 \colll 0 2 4 + 2 \colll 1 3 5 = \colll 2 4 6 $$ In general, $$ \kern-9ex T_A \left( \coll x y \right) = A \coll x y = \bmat{rr} 0 & 1 \\ 2 & 3 \\ 4 & 5 \emat \coll x y = x \colll 0 2 4 + y \colll 1 3 5 = \colll y {2x+3y} {4x + 5y} $$ Note that the matrix $A$ is visible in the last expression.
Definition: Any rule $T$ that assigns to each $\vx$ in $\R^n$ a vector $T(\vx)$ in $\R^m$ is called a transformation from $\R^n$ to $\R^m$ and is written $T : \R^n \to \R^m$.
For our $A$ above, we have $T_A : \R^2 \to \R^3$. $T_A$ is in fact a linear transformation.
Definition: A transformation $T : \R^n \to \R^m$ is called a
linear transformation if:
1. $T(\vu + \vv) = T(\vu) + T(\vv)$ for all $\vu$ and $\vv$ in $\R^n$, and
2. $T(c \vu) = c \, T(\vu)$ for all $\vu$ in $\R^n$ and all scalars $c$.
You can check directly that our $T_A$ is linear. For example, $$ \kern-9ex T_A \left( c \coll x y \right) = T_A \left( \coll {cx} {cy} \right) = \colll {cy} {2cx + 3cy} {4cx + 5cy} = c \colll y {2x+3y} {4x + 5y} = c \, T_A \left( \coll x y \right) $$ Check condition (1) yourself, or see Example 3.55.
In fact, every $T_A$ is linear:
Theorem 3.30: Let $A$ be an $m \times n$ matrix. Then $T_A : \R^n \to \R^m$ is a linear transformation.
Proof: Let $\vu$ and $\vv$ be vectors in $\R^n$ and let $c \in \R$. Then $$ T_A(\vu + \vv) = A(\vu + \vv) = A \vu + A \vv = T_A(\vu) + T_A(\vv) $$ and $$ T_A(c \vu) = A(c \vu) = c \, A \vu = c \, T_A(\vu) \qquad\Box $$
Example 3.56: Let $F : \R^2 \to \R^2$ be the transformation that sends each point to its reflection in the $x$-axis. Show that $F$ is linear.
Solution: We need to show that $$ F(\vu + \vv) = F(\vu) + F(\vv) \qtext{and} F(c \vu) = c \, F(\vu) $$ Give a geometrical explanation on the board.
Algebraically, note that $F(\coll x y) = \coll x {-y}$, from which you can check directly that $F$ is linear. (Exercise.)
Or, observe that $F(\coll x y) = \bmat{rr} 1 & 0 \\ 0 & -1 \emat \coll x y$, so $F = T_A$ where $A = \bmat{rr} 1 & 0 \\ 0 & -1 \emat$.
Here is an applet giving many examples.
Example: Let $N : \R^2 \to \R^2$ be the transformation $$ N \left( \coll x y \right) := \coll {xy} {x+y} $$ Is $N$ linear?
Example 22-1: More examples on board.
It turns out that every linear transformation is a matrix transformation.
Theorem 3.31: Let $T : \R^n \to \R^m$ be a linear transformation. Then $T = T_A$, where $$ A = [\, T(\ve_1) \mid T(\ve_2) \mid \cdots \mid T(\ve_n) \,] $$
Proof: We just check: $$ \kern-4ex \begin{aligned} T(\vx)\ &= T(x_1 \ve_1 + \cdots + x_n \ve_n) \\ &= x_1 T(\ve_1) + \cdots + x_n T(\ve_n) \qtext{since $T$ is linear} \\ &= [\, T(\ve_1) \mid T(\ve_2) \mid \cdots \mid T(\ve_n) \,] \colll {x_1} {\vdots} {x_n} \\ &= A \vx = T_A(\vx) \qquad\qquad\Box \end{aligned} $$
The matrix $A$ is called the standard matrix of $T$ and is written $[T]$.
Example 22-2: Consider the transformation $T : \R^3 \to \R^2$ defined by $$ T\left(\colll x y z\right) = \coll {2x + 3y - z} {y + z} . $$ Is $T$ linear? If so, find $[T]$. On board.
Example 3.58: Let $R_\theta : \R^2 \to \R^2$ be rotation by an angle $\theta$ counterclockwise about the origin. Show that $R_\theta$ is linear and find its standard matrix.
Started in Lecture 22, but will be done again in Lecture 23.