diff --git a/Advanced/Linear Algebra 101/main.tex b/Advanced/Linear Algebra 101/main.tex index 581a285..a01ac97 100755 --- a/Advanced/Linear Algebra 101/main.tex +++ b/Advanced/Linear Algebra 101/main.tex @@ -43,8 +43,8 @@ \problem{} Show that the euclidean norm satisfies the triangle inequalty: $$ - ||x+y|| \leq ||x|| + ||y|| - $$: + ||x+y|| \leq ||x|| + ||y|| + $$ \vfill @@ -52,7 +52,7 @@ Show that the eucidean norm satisfies the reverse triangle inequality: $$ - ||x - y|| \geq |~||x|| - ||y||~| + ||x-y|| \geq |~||x|| - ||y||~| $$ \vfill @@ -61,7 +61,7 @@ Prove the Cauchy-Schwartz inequality: $$ - ||x \cdot y|| = ||x||~||y|| + ||x \cdot y|| \leq ||x||~||y|| $$ \vfill diff --git a/Advanced/Linear Algebra 101/parts/0 notation.tex b/Advanced/Linear Algebra 101/parts/0 notation.tex index aba4de2..fc6a12b 100755 --- a/Advanced/Linear Algebra 101/parts/0 notation.tex +++ b/Advanced/Linear Algebra 101/parts/0 notation.tex @@ -7,7 +7,7 @@ \item $\mathbb{R}^+_0$ is the set of positive real numbers and zero. \end{itemize} -Mathematicians are often inconsistent with their notation. Depending on the author, their mood, and the phase of the moon, $\mathbb{R}^+$ may or may not include zero. I will use the definitions above. +Mathematicians are often inconsistent with their notation. Depending on the author, their mood, and the phase of the moon, $\mathbb{R}^+$ may or may not include zero. We will use the definitions above. \definition{} @@ -64,12 +64,12 @@ What is $\mathbb{R} \times \mathbb{R}$? \\ \definition{} $\mathbb{R}^n$ is the set of $n$-tuples of real numbers. \\ -In english, this means that an element of $\mathbb{R}^n$ is a list of $n$ real numbers: \\ +In English, this means that an element of $\mathbb{R}^n$ is a list of $n$ real numbers: \\ \vspace{4mm} Elements of $\mathbb{R}^2$ look like $(a, b)$, where $a, b \in \mathbb{R}$. \hfill \note{\textit{Note:} $\mathbb{R}^2$ is pronounced \say{arrgh-two.}} -Elements of $\mathbb{R}^5$ look like $(a_1, a_2, a_3, a_4 a_5)$, where $a_n \in \mathbb{R}$. \\ +Elements of $\mathbb{R}^5$ look like $(a_1, a_2, a_3, a_4, a_5)$, where $a_n \in \mathbb{R}$. \\ $\mathbb{R}^1$ and $\mathbb{R}$ are identical. diff --git a/Advanced/Linear Algebra 101/parts/1 vectors.tex b/Advanced/Linear Algebra 101/parts/1 vectors.tex index b135a64..e37ea1c 100755 --- a/Advanced/Linear Algebra 101/parts/1 vectors.tex +++ b/Advanced/Linear Algebra 101/parts/1 vectors.tex @@ -57,18 +57,19 @@ Can you develop geometric intuition for their sum and difference? \pagebreak \definition{Euclidean Norm} -In general, a \textit{norm} on $\mathbb{R}^n$ is a map from $\mathbb{R}^n$ to $\mathbb{R}^+_0$ \\ -Usually, one thinks of a norm as a \say{length metric} on a vector space. \\ +A \textit{norm} on $\mathbb{R}^n$ is a map from $\mathbb{R}^n$ to $\mathbb{R}^+_0$ \\ +Usually, one thinks of a norm as a way of mesuring \say{length} in a vector space. \\ The norm of a vector $v$ is written $||v||$. \\ \vspace{2mm} -We usually use the \textit{euclidean norm} when we work in $\mathbb{R}^n$. \\ -If $v \in \mathbb{R}^n$, the euclidean norm is defined as follows: +We usually use the \textit{Euclidean norm} when we work in $\mathbb{R}^n$. \\ +If $v \in \mathbb{R}^n$, the Euclidean norm is defined as follows: \\ +If $v = [v_1, v_2, ..., v_n]$, $$ ||v|| = \sqrt{v_1^2 + v_2^2 + ... + v_n^2} $$ -This is simply an application of the pythagorean theorem. +This is simply an application of the Pythagorean theorem. \problem{} Compute the euclidean norm of @@ -78,4 +79,10 @@ Compute the euclidean norm of \end{itemize} \vfill + +\problem{} +Show that $a \cdot a$ is $||a||^2$. + +\vfill + \pagebreak \ No newline at end of file diff --git a/Advanced/Linear Algebra 101/parts/2 dotprod.tex b/Advanced/Linear Algebra 101/parts/2 dotprod.tex index a7e24d1..3ff7f6b 100644 --- a/Advanced/Linear Algebra 101/parts/2 dotprod.tex +++ b/Advanced/Linear Algebra 101/parts/2 dotprod.tex @@ -11,7 +11,7 @@ The dot product maps two elements of $\mathbb{R}^n$ to one element of $\mathbb{R \vspace{2mm} - It's also worth noting that a function $f$ from $X$ to $Y$ can defined as a subset of $X \times Y$, where for all $x \in X$ there exists a unique $y \in Y$ so that $(x, y) \in f$. Try to make sense of this definition. + It's also worth noting that a function $f$ from $X$ to $Y$ can be defined as a subset of $X \times Y$, where for all $x \in X$ there exists a unique $y \in Y$ so that $(x, y) \in f$. Try to make sense of this definition. } $$ @@ -27,9 +27,11 @@ Compute $[2, 3, 4, 1] \cdot [2, 4, 10, 12]$ Show that the dot product is \begin{itemize} \item Commutative - \item Distributive - \item Homogeneic: $x(a \cdot b) = xa \cdot b = a \cdot xb$ - \item Positive definite: $a \cdot a \geq 0$, with equality iff $a = 0$ + \item Distributive $a \cdot (b + c) = a \cdot b + a \cdot c$ + \item Homogenous: $x(a \cdot b) = xa \cdot b = a \cdot xb$ \\ + \note{$x \in \mathbb{R}$, and $a, b$ are vectors.} + \item Positive definite: $a \cdot a \geq 0$, with equality iff $a = 0$ \\ + \note{$a \in \mathbb{R}^n$, and $0$ is the zero vector.} \end{itemize} @@ -40,7 +42,8 @@ Show that the dot product is \problem{} -Say you have two vectors, $a$ and $b$. Show that $a \cdot b$ = $||a||~||b||\cos(\alpha)$ \\ +Say you have two vectors, $a$ and $b$. Show that $a \cdot b$ = $||a||~||b||\cos(\alpha)$, \\ +where $\alpha$ is the angle between $a$ and $b$. \\ \hint{What is $c$ in terms of $a$ and $b$?} \hint{The law of cosines is $a^2 + b^2 - 2ab\cos(\alpha) = c^2$} \hint{The length of $a$ is $||a||$} diff --git a/Advanced/Linear Algebra 101/parts/3 matrices.tex b/Advanced/Linear Algebra 101/parts/3 matrices.tex index 094fa8b..60683d2 100644 --- a/Advanced/Linear Algebra 101/parts/3 matrices.tex +++ b/Advanced/Linear Algebra 101/parts/3 matrices.tex @@ -9,7 +9,10 @@ A = 4 & 5 & 6 \end{bmatrix} $$ -The above matrix has two rows and three columns. It is thus a $2 \times 3$ matrix. +The above matrix has two rows and three columns. It is thus a $2 \times 3$ matrix. \\ +\vspace{1mm} +The order \say{first rows, then columns} is usually consistent in linear algebra. \\ +If you look closely, you may also find it in the next definition. \definition{} We can define the product of a matrix $A$ and a vector $v$: @@ -34,8 +37,8 @@ Note that each element of the resulting $2 \times 1$ matrix is the dot product o $$ Av = \begin{bmatrix} - \text{---} a_1 \text{---} \\ - \text{---} a_2 \text{---} + \text{---} r_1 \text{---} \\ + \text{---} r_2 \text{---} \end{bmatrix} \begin{bmatrix} | \\ @@ -44,20 +47,13 @@ Av = \end{bmatrix} = \begin{bmatrix} - r_1v \\ - r_2v + r_1 \cdot v \\ + r_2 \cdot v \end{bmatrix} $$ Naturally, a vector can only be multiplied by a matrix if the number of rows in the vector equals the number of columns in the matrix. - -\problem{} -Say you multiply a size-$m$ vector by an $m \times n$ matrix. What is the size of your result? - -\vfill - - \problem{} Compute the following: @@ -72,6 +68,13 @@ $$ \end{bmatrix} $$ +\vfill + + +\problem{} +Say you multiply a size-$m$ vector $v$ by an $m \times n$ matrix $A$. \\ +What is the size of your result $Av$? + \vfill \pagebreak @@ -99,8 +102,8 @@ Note each element of the resulting matrix is dot product of a row of $A$ and a c $$ AB = \begin{bmatrix} - \text{---} a_1 \text{---} \\ - \text{---} a_2 \text{---} + \text{---} r_1 \text{---} \\ + \text{---} r_2 \text{---} \end{bmatrix} \begin{bmatrix} | & | \\ @@ -109,8 +112,8 @@ AB = \end{bmatrix} = \begin{bmatrix} - r_1v_1 & r_1v_2 \\ - r_2v_1 & r_2v_2 \\ + r_1 \cdot v_1 & r_1 \cdot v_2 \\ + r_2 \cdot v_1 & r_2 \cdot v_2 \\ \end{bmatrix} $$ @@ -263,7 +266,7 @@ Vertical arrays don't look good in horizontal text. \problem{} Consider the vectors $a = [1, 4, 3]^T$ and $b = [9, 1, 4]^T$ \\ \begin{itemize} - \item Compute the dot product $ab$. + \item Compute the dot product $a \cdot b$. \item Can you redefine the dot product using matrix multiplication? \end{itemize} \note{As you may have noticed, a vector is a special case of a matrix.}