Th: 3C 10:55 Discussion of representation by numbers in LLM; $\forall v$ has a unique representation $v = a_1v_1 + a_2v_2 +....+ a_nv_n$ $a_i \in F$ $\sum_{i=1}^{n}a_iv_i$ $\beta$ = $( v_1, v_2, ...., v_n)$ $\gamma = (w_1, w_2, ...., w_m)$ discussion of vector spaces is a rudimentary stage of the idea of representing states of the world by numbers begins with an abstract definition of a vector space, which has nothing to do with numerical representations of objects vectors get represented by a column of numbers with a linear transformation, may have a representation by a matrix start with a linear map; a matrix is a representation of all the information you need to know to reconstruct a linear map once you have fixed the basis in V and the basis in W necessry and sufficient to know where each of the basis elements goes. each vi under T; $T(v_i$) First, represent any vector in V as a linear combination of the basis vectors of V; Then represent each basis vector of V as a linear combination of the basis vectors of W. The resulting coefficient, $A_{i,j}$ has the first index showing which $w_i$ it multiplies, and the second index, j, showing which $v_j$ it is representing as a linear combination of the $w_i$ So the matrix M captures the two linear combinations that constitute T, the linear transformation from V to W. W is $F^m$ Then T($v_1)$ is a column vector = $\begin{pmatrix}A_{1,1}\\ A_{1,2}\\...\\A_{1,m}\end{pmatrix}$ V dimension : basis every vector in V has unique representation as elements of basis use summation sign: ( Note clever use of nested summations by Axler in motivating the definition of M: and matrix multiplication; very LEAN in style; try to work out each step) since unique; once fixed basis; 1-1 correspondence: bijection between V and Fn represent as column specific correspondence v sub Beta Now, with two vector fields, V, W choose basis beta in V; numbers LLM is all the rage.....numbers for tokens and token proximity Matrix Necessary and sufficient to know where each of the bases goes under T v is expressed as linear combination of $v_i$ bases; T carries v to w; w is expressed as linear combination of $w_i$ bases v1 goes to expression above. Potential for small confusion; row to column; Then T($v_1)$ is a column vector = $\begin{pmatrix}A_{1,1}\\ A_{1,2}\\...\\A_{1,m}\end{pmatrix}$ $\large M\left(T\right)_\beta^\gamma$ = $\left[T(v_1)\right]_\gamma$ $\left[T(v_2)\right]_\gamma$ $\left[T(v_3)\right]_\gamma$..., $\left[T(v_n)\right]_\gamma$ The matrix is formed from columns of coefficients. Call it Matrix A. Choice of Capital A is equivalent to small a for coefficient. Note subscript representing the basis of the last vector space For matrix multiplication, take the columns of coefficients showing representation as sums of W bases, with the weights of, or multiplied by, the column of a's, where the a's are coefficients of the expression of $v$ as linear combination of $v_i$ bases so, $a_1$ $\left[T(v_1)\right]_\gamma$ + $a_2$ $\left[T(v_2)\right]_\gamma$ + $a_3$ $\left[T(v_3)\right]_\gamma$ + ... + $a_n$ $\left[T(v_n)\right]_\gamma$ or, in older conventional way, multiply row with column of a's. So, more illuminating, take linear combination of columns weighted by ai Important to see both --- Use a geometric example: two basis vectors as vectors in two-dimensional plane. Vector space of geometric origin: Blackboard as vector space start with point, directed interval = vector no basis. no coordinate system; no grid Only have rule of addition as parallelogram rule; rule of scalar multiplication. Notion of linear map T = rotation by some angle $\large\theta$ Note that linearity is assumed. Discussion below. T is rotation by $\theta$ in counter-clockwise direction. Represent by matrix; m x n entries. Elements of F = R V to V is 2dim to 2dim Must choose a basis; V and W = V Bases: gamma = beta : choose same basis for V, W - choose basis in each space : - basis : two vectors with angle between of 90 degrees; same length v2 is rotating v1 by 90 degrees; to assume this is linear, need to say that this is based on the formal system of Euclidian geometry, where the parallelogram rule means that rotation of two vectors also rotates the diagonal, which does not change in length. M($T_\Theta)$ = $\left[T(v_1)\right]_\gamma^\gamma$ $\left[T(v_2)\right]_\gamma^\gamma$ matrix of T theta - What is $\left[T(v_1)\right]_\gamma^\gamma$ ? ; - this is a two-element column vector. v1 is the horizontal basis vector along the x axis; v2 is the vertical basis vector along the y axis. Remember from trigonometry that the x-coordinate of the transformed or rotated vector is equal to the cosine of the angle $\large\theta$ = the angle of rotation, times the length of the basis vector. Why? because cos $\large\theta$ is the horizontal length divided by the length of the hypotenuse, which has the length of the basis vector vector, so multiply by the length of the basis vector and get the horizontal length = cos $\large\theta$. Same for vertical length, but the length of the vertical is sin $\large\theta$ So get first column vector: $\begin{pmatrix}cos\; \large\theta\\ sin\;\large\theta\end{pmatrix}$ T(v2) is rotation so distance is negative on x axis; $\begin{pmatrix}- sin\; \large\theta\\ cos\;\large\theta\end{pmatrix}$ So, any vector v under T will go to T(v) using this matrix. Demonstrate that multiplication of matrix as y1 times column 1 + y2 times column 2 is same as row times column Nice application; derivation of trigonometric formulas: --- Composition of linear maps: in book; reread; Three natural operations: (T1 + T2 )v = T1(v) + T2(v) $(\lambda$ T1)(v) = $\lambda$ (T1(v) By defining two operations on the set of linear maps, that set is a vector space. Linear maps were at first defined on vector spaces. Now, zooming out, the set of linear maps is a vector space. First two operations on the set of linear maps. --- Since each linear map from a vector space to a vector space can be associated with a matrix, what does this look like for operations on matrices? Addition; term by term of matrix Scalar multiplication; term by term Lemma: beta basis of V; gamma is basis of W; m x n matrix; ADD --- Third operation: composition Note that sequence of composition is confusing write from left to right, but apply from right to left Apply T1 from V to W; apply T2 from W to U, but write T2 T1 For operations on matrices, note: not on set of $\mathcal{L}(V, W)$ but on $\mathcal{L}(V, W)$ x $\mathcal{L}(W, U)$ to $\mathcal{L}(V, U)$. where x is cartesian product ___ Use the composition of linear maps as the multiplication of matrices Show that applying this to the 2 x 2 rotation matrix yields the formulas for cosine ( $\large\Theta_1 \; + \; \large\Theta_2)$ and same for sine. --- Example 2: Use $\mathbb{C}$ but over field of $\mathbb{R}$ so it has dimension 2 The basis is (1, i) Define linear map T from V with v as complex number to V, where this V is defined as z v where z is a complex number - z = x + y i - This is special, since it is a field, so it has both addition and multiplication, which most vector fields do not. This defines a linear map (show it somehow) - Since it's a linear map, we can represent this linear map by a 2 x 2 matrix with real entries - Apply linear map T to each of the basis elements. - basis vectors: 1, i - 1 is $v_1$ , i is $v_2$ - T($v_1$ ) = z $v_1$ = z 1 = z = x 1 + y i = the column form of a time basis vector gives - $\begin{pmatrix}x\;\\y \end{pmatrix}$ - T($v_2$) = z $v_2$ = z i = (x + y i) i = x i + y $i^2$ = - y + x i - The column vector is - $\begin{pmatrix}-y\;\\x \end{pmatrix}$ - So the matrix is - $\begin{pmatrix}x\;\\y \end{pmatrix}$ $\begin{pmatrix}-y\;\\x \end{pmatrix}$ Complex z = x + yi is represented by this matrix. Sum of complex numbers corresponds to addition of these matrices; Product of real times complex number corresponds to multiplication of this matrix by a real number. Multiplication of two complex numbers corresponds to multiplication of these matrices. The most mysterious operation here. Once you know what a two by two matrix is, there is nothing mysterious about a complex number any more. i i = -1 Cardano: mental torture $i\;=\begin{pmatrix} 0 & -1\\ 1 & 0 \end{pmatrix}$ $\begin{align} i\;i &=\begin{pmatrix} 0 & -1\\ 1 & 0 \end{pmatrix}\begin{pmatrix} 0 & -1\\ 1 & 0 \end{pmatrix}\\\\ i^2 \;&= \begin{pmatrix} -1 &0\\ 0 & -1 \end{pmatrix} \end{align}$