Math 1600 Lecture 22, Section 002, 4 Nov 2024

$ \newcommand{\bdmat}[1]{\left|\begin{array}{#1}} \newcommand{\edmat}{\end{array}\right|} \newcommand{\bmat}[1]{\left[\begin{array}{#1}} \newcommand{\emat}{\end{array}\right]} \newcommand{\coll}[2]{\bmat{r} #1 \\ #2 \emat} \newcommand{\ccoll}[2]{\bmat{c} #1 \\ #2 \emat} \newcommand{\colll}[3]{\bmat{r} #1 \\ #2 \\ #3 \emat} \newcommand{\ccolll}[3]{\bmat{c} #1 \\ #2 \\ #3 \emat} \newcommand{\collll}[4]{\bmat{r} #1 \\ #2 \\ #3 \\ #4 \emat} \newcommand{\ccollll}[4]{\bmat{c} #1 \\ #2 \\ #3 \\ #4 \emat} \newcommand{\colllll}[5]{\bmat{r} #1 \\ #2 \\ #3 \\ #4 \\ #5 \emat} \newcommand{\ccolllll}[5]{\bmat{c} #1 \\ #2 \\ #3 \\ #4 \\ #5 \emat} \newcommand{\red}[1]{{\color{red}#1}} \newcommand{\blue}[1]{{\color{blue}#1}} \newcommand{\lra}[1]{\mbox{$\xrightarrow{#1}$}} \newcommand{\rank}{\textrm{rank}} \newcommand{\row}{\textrm{row}} \newcommand{\col}{\textrm{col}} \newcommand{\null}{\textrm{null}} \newcommand{\nullity}{\textrm{nullity}} \renewcommand{\Re}{\operatorname{Re}} \renewcommand{\Im}{\operatorname{Im}} \renewcommand{\Arg}{\operatorname{Arg}} \renewcommand{\arg}{\operatorname{arg}} \newcommand{\adj}{\textrm{adj}} \newcommand{\mystack}[2]{\genfrac{}{}{0}{0}{#1}{#2}} \newcommand{\mystackthree}[3]{\mystack{\mystack{#1}{#2}}{#3}} \newcommand{\qimplies}{\quad\implies\quad} \newcommand{\qtext}[1]{\quad\text{#1}\quad} \newcommand{\qqtext}[1]{\qquad\text{#1}\qquad} \newcommand{\smalltext}[1]{{\small\text{#1}}} \newcommand{\svec}[1]{\,\vec{#1}} \newcommand{\querytext}[1]{\toggle{\blue{\text{?}}\vphantom{\text{#1}}}{\text{#1}}\endtoggle} \newcommand{\query}[1]{\toggle{\blue{\text{?}}\vphantom{#1}}{#1}\endtoggle} \newcommand{\smallquery}[1]{\toggle{\blue{\text{?}}}{#1}\endtoggle} \newcommand{\bv}{\mathbf{v}} \newcommand{\cyc}[2]{\cssId{#1}{\style{visibility:hidden}{#2}}} $

Announcements:

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.

Partial review of Lecture 21:

Section 1.1: Vectors in $\Z_m^n$

Definition: $\Z_m := \{ 0, 1, 2, \ldots, m-1 \}$ with addition and multiplication modulo $m$.
$\Z_m^n := $ vectors with $n$ components in $\Z_m$.

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$.

Section 8.1: Applications: Code Vectors

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.

New material:

Example: Working in $\Z_{12}$ is often called "clock arithmetic". For example, 6 hours after 11am is 5pm, and $11 + 6 = 5 \pmod{12}.$ However, we write $0$ not $12$ when working in $\Z_{12}$.

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.

Section 3.6: Linear Transformations

Given an $m \times n$ matrix $A$, we can use $A$ to transform a column vector in $\R^n$ into a column vector in $\R^m$. We write: $$ T_A(\vx) = A \vx \quad\text{for $\vx$ in $\R^n$} $$

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.