\documentclass[12pt]{article} \usepackage{graphicx, multicol, amsmath, wrapfig,enumerate} %\pagestyle{empty} \parindent=0pt \parskip=.1in \newcommand\hs{\hspace{6pt}} \begin{document} \centerline{\bf \large{Linear Algebra by Example}} \bigskip This is meant as a group of examples reviewing the basic mathematical operations of linear algebra. For more words between the math refer to the readings listed in the syllabus. Each section is followed by a problem for you to attempt. Solutions are on the last page. A great reference for many of these ideas is \textbf{Boas} - Sections 3.3 and 3.6\\ \bigskip \centerline{\bf Matrix Addition} $$C_{ij}=A_{ij}+B{ij}$$ $$ A = \left(\begin{array}{cc} a&b\\ c&d\\ \end{array} \right) \hs B= \left(\begin{array}{cc} e&f\\ g&h\\ \end{array} \right) $$ \medskip $$A+B= \left(\begin{array}{cc} a&b\\ c&d\\ \end{array} \right)+ \left(\begin{array}{cc} e&f\\ g&h\\ \end{array} \right)= \left(\begin{array}{cc} a+e&b+f\\ c+g&d+h\\ \end{array} \right)$$\\ \bigskip $$\left(\begin{array}{cc} 1&2\\ 3&4\\ 5&6\\ \end{array} \right)+ \left(\begin{array}{cc} 7&8\\ 9&10\\ 11&12\\ \end{array} \right)= \left(\begin{array}{cc} 8&10\\ 12&14\\ 16&18\\ \end{array} \right)$$\\ \bigskip $$ \left(\begin{array}{cc} 1&2\\ 3&4\\ \end{array} \right)+ \left(\begin{array}{ccc} 5&6&7\\ 8&9&10\\ 11&12&13\\ \end{array} \right)= undefined$$\\ For addition to be defined both matrices must be of the same dimension; the same number of rows and columns.\\ \newpage \centerline{\bf Scalar Multiplication} $$C_{ij}=\lambda A_{ij} \mbox{ where $\lambda$ is a scalar}$$ \bigskip $$A = \left(\begin{array}{cc} a&b\\ c&d\\ \end{array} \right) $$ \medskip $$ 3A=3\cdot \left(\begin{array}{cc} a&b\\ c&d\\ \end{array} \right)= \left(\begin{array}{cc} 3a&3b\\ 3c&3d\\ \end{array} \right)$$\\ Each element of the matrix is multiplied by the scalar.\\ Try it for yourself (answers are on the last page): \begin{enumerate}[A)] \item$$ i\cdot \left(\begin{array}{cc} 1&i\\ -2i&3\\ \end{array} \right) $$ \end{enumerate} \newpage \centerline{\bf Matrix Multiplication} This is a bit difficult. Watch the progression. Basically the elements of the row of the first matrix are multiplied by the elements of the column of the second matrix. $$C_{ij}=\sum_k A_{ik}B_{kj}$$ \bigskip $$ \left(\begin{array}{cc} a&b\\ \end{array} \right) \left(\begin{array}{c} e\\ g\\ \end{array} \right)=ae+bg$$ \medskip $$ \left(\begin{array}{cc} a&b\\ c&d\\ \end{array} \right) \left(\begin{array}{c} e\\ g\\ \end{array} \right)= \left(\begin{array}{cc} ae+bg\\ ce+dg\\ \end{array} \right)$$ \bigskip $$ \left(\begin{array}{cc} a&b\\ \end{array} \right) \left(\begin{array}{cc} e&f\\ g&h\\ \end{array} \right)= \left(\begin{array}{cc} ae+bg&af+bh\\ \end{array} \right)$$ \bigskip $$ \left(\begin{array}{cc} a&b\\ c&d\\ \end{array} \right) \left(\begin{array}{cc} e&f\\ g&h\\ \end{array} \right)= \left(\begin{array}{cc} ae+bg&af+bh\\ ce+dg&cf+dh \end{array} \right)$$ \bigskip $$ \left(\begin{array}{cc} 1&2\\ 3&4\\ \end{array} \right) \left(\begin{array}{cc} 5&6\\ 7&8\\ \end{array} \right)= \left(\begin{array}{cc} 1(5)+2(7)&1(6)+2(8)\\ 3(5)+4(7)&3(6)+4(8) \end{array} \right)= \left(\begin{array}{cc} 19&22\\ 43&50\\ \end{array} \right)$$ \bigskip $$\left(\begin{array}{cc} a&b\\ \end{array} \right) \left(\begin{array}{cc} c&d\\ \end{array} \right)=undefined$$ For matrix multiplication to be defined the number of columns of the matrix on the left must equal the number of rows of the matrix on the right.\\ Try it for yourself (answers are on the last page): \begin{enumerate}[B)] \item$$ \left(\begin{array}{cc} 1&i\\ -i&1\\ \end{array} \right) \left(\begin{array}{c} 1\\ -1\\ \end{array} \right)$$ \end{enumerate} \newpage \centerline{\bf Transpose} $$\left(A_{ij}\right)^T=A_{ji}$$ \medskip $$A = \left(\begin{array}{cc} a&b\\ c&d\\ \end{array} \right) \hs A^T= \left(\begin{array}{cc} a&c\\ b&d\\ \end{array} \right) $$ \medskip $$B = \left(\begin{array}{ccc} a&b&c\\ d&e&f\\ g&h&i\\ \end{array} \right) \hs B^T= \left(\begin{array}{ccc} a&d&g\\ b&e&h\\ c&f&i\\ \end{array} \right)$$ A matrix is called \textbf{symmetric} if it is equal to its transpose, $A = A^T$.\\ \bigskip \centerline{\bf Hermitian Adjoint} $$\left(A_{ij}\right)^\dagger=A_{ji}^*$$ This is the same as transpose except that along with switching row and column elements you also complex conjugate all the elements. If all the elements of a matrix are real, the Hermitian adjoint and transpose are equivalent. $$A = \left(\begin{array}{c} 1\\ i\\ -2i\\ \end{array} \right) $$ \medskip $$A^\dagger = \left(\begin{array}{ccc} 1&-i&2i\\ \end{array} \right) $$ A matrix is called \textbf{Hermitian} if it is equal to its adjoint, $A = A^\dagger$.\\ Try it for yourself (answers are on the last page): \begin{enumerate}[C)] \item What is $B^\dagger$?$$ B=\left(\begin{array}{cc} 1&i\\ -5i&i\\ \end{array} \right)$$ \end{enumerate} \newpage \centerline{\bf Trace} $$Tr[A]=\sum_i A_{ii}$$ This is just the sum of all the diagonal elements of the matrix. $$A=\left(\begin{array}{ccc} 1&2&3\\ 4&5&6\\ 7&8&9\\ \end{array}\right) $$ \bigskip $$Tr[A]=1+5+9=15$$ Try it for yourself (answers are on the last page): \begin{enumerate}[D)] \item$$ Tr\left(\begin{array}{ccc} 1&34&5\\ 23&5&98\\ 132&7&9\\ \end{array} \right)$$ \end{enumerate} \newpage \centerline{\bf Determinants} Check one of the books for reference. This operation is a little difficult to remember through example, but this should provide some idea. $$2\times2$$ $$ Det\left(\begin{array}{cc} a&b\\ c&d\\ \end{array} \right)=ad-bc$$ \bigskip $$3\times3$$ $$ Det\left(\begin{array}{ccc} a&b&c\\ d&e&f\\ g&h&i\\ \end{array} \right)= a\cdot \left(\begin{array}{cc} e&f\\ h&i\\ \end{array}\right)- b\cdot \left(\begin{array}{cc} d&f\\ g&i\\ \end{array}\right)+ c\cdot \left(\begin{array}{cc} d&e\\ g&h\\ \end{array}\right) $$ The smaller $2\times2$ determinants are called the \textbf{cofactors} of the element a, b, and c, respectively. The minus in front of the b is part of the cofactor. They are formed by keeping only what is left after eliminating everything from the row and column where the element desired resides. So, for a, the row elements, b and c, and the column elements, d and g, are eliminated leaving the $2\times2$ matrix above. $$=a\cdot(ei-hf)-b\cdot(di-gf)+c\cdot(dh-ge$$ $$=aei-ahf-bdi+bgf+cdh-cge$$ $$4\times4$$ \centerline{A straight extension of the above, but it is easier to just go to a computer!!!}\\ Try it for yourself (answers are on the last page): \begin{enumerate}[E)] \item$$ Det\left(\begin{array}{ccc} 1&2&3\\ 4&5&6\\ 7&8&9\\ \end{array} \right)$$ \end{enumerate} \newpage \centerline{\bf Inverses} $A^{-1}$ is the matrix such that when multiplied by the matrix A the result is the \textbf{identity matrix}. The identity matrix is a matrix with ones down the diagonal and zeroes everywhere else. $$2\times2$$ $$A=\left(\begin{array}{cc} a&b\\ c&d\\ \end{array} \right)$$ $$A^{-1}={1\over Det[A]}\left(\begin{array}{cc} d&-b\\ -c&a\\ \end{array} \right)$$ \medskip $$3\times3$$ This matrix $B^{-1}$ is the transpose of the matrix made of all cofactors of B divided by the determinant of B. This is easier said in symbols: $$B=\left(\begin{array}{ccc} a&b&c\\ d&e&f\\ g&h&i\\ \end{array} \right)$$ $$A^{-1}={1\over Det[B]} \left(\begin{array}{ccc} Det\left|\begin{array}{cc} e&f\\ h&i\\ \end{array} \right|&-Det\left|\begin{array}{cc} b&c\\ h&i\\ \end{array} \right|&Det\left|\begin{array}{cc} b&c\\ e&f\\ \end{array} \right|\\ \\ -Det\left|\begin{array}{cc} d&f\\ g&i\\ \end{array} \right|&Det\left|\begin{array}{cc} a&c\\ g&i\\ \end{array} \right|&-Det\left|\begin{array}{cc} a&c\\ d&f\\ \end{array} \right|\\ \\ Det\left|\begin{array}{cc} d&e\\ g&h\\ \end{array} \right|&-Det\left|\begin{array}{cc} a&b\\ g&h\\ \end{array} \right|&Det\left|\begin{array}{cc} a&b\\ d&e\\ \end{array} \right|\\ \end{array} \right) $$\\ Try it for yourself (answers are on the last page): \begin{enumerate}[F)] \item What is $B^{-1}$ ? Verify that $BB^{-1}$ is the identity matrix.$$ B=\left(\begin{array}{cc} 1&2\\ 3&4\\ \end{array} \right)$$ \end{enumerate} \newpage The above represent a good selection of the types of linear algebra operations that arise in physics. Again, check the references for more detail.\\ \centerline{\bf Notation} Column matrices play a special role in physics. They are interpreted as \textbf{vectors} or \textbf{states}. To remind us of this uniqueness they have their own special notation; introduced by Dirac. It is called bra-ket notation. The reasons why and how to use these are the subject of this preface. So, the column matrix below has the notation: $$\left|1\right>=\left(\begin{array}{c} a\\ b\\ c\\ \end{array}\right)=vector$$\\ The adjoint of this vector is denoted: $$\left(\left|1\right>\right)^\dagger=\left<1\right|=\left(\begin{array}{ccc} a^*&b^*&c^*\\ \end{array}\right)$$\\ As one quick application, if we take $\left|1\right>$ as 3-vector with components a, b, and c then the scalar product or the length of the vector is: $$\left<1|1\right>=\left(\begin{array}{ccc} a^*&b^*&c^*\\ \end{array}\right) \left(\begin{array}{c} a\\ b\\ c\\ \end{array}\right)=\left|a\right|^2+\left|b\right|^2+\left|c\right|^2 $$ which is exactly the result expected. This is one example of the cross over region between linear algebra and vector analysis. Again we will do much more of this throughout the week. \newpage \centerline{\bf Solutions} \begin{enumerate}[A)] \item$$ i\cdot \left(\begin{array}{cc} 1&i\\ -2i&3\\ \end{array} \right)=\left(\begin{array}{cc} i&-1\\ 2&3i\\ \end{array} \right) $$ \item$$ \left(\begin{array}{cc} 1&i\\ -i&1\\ \end{array} \right) \left(\begin{array}{c} 1\\ -1\\ \end{array} \right)= \left(\begin{array}{c} 1-i\\ -i-1\\ \end{array} \right)$$ \item$$ B=\left(\begin{array}{cc} 1&i\\ -5i&i\\ \end{array} \right) \hs B^\dagger=\left(\begin{array}{cc} 1&5i\\ -i&-i\\ \end{array} \right) $$ \item$$ Tr\left(\begin{array}{ccc} 1&34&5\\ 23&5&98\\ 132&7&9\\ \end{array} \right)=1+5+9=15$$ \item$$ Det\left(\begin{array}{ccc} 1&2&3\\ 4&5&6\\ 7&8&9\\ \end{array} \right)=1\cdot Det\left|\begin{array}{cc} 5&6\\ 8&9\\ \end{array}\right|-2\cdot Det\left|\begin{array}{cc} 4&6\\ 7&9\\ \end{array}\right|+3\cdot Det\left|\begin{array}{cc} 4&5\\ 7&8\\ \end{array}\right|$$ $$=1(45-48)-2(36-42)+3(32-35)=-3+12-9=0$$ \item$$ B=\left(\begin{array}{cc} 1&2\\ 3&4\\ \end{array} \right) \hs B^{-1}={1\over -2}\left(\begin{array}{cc} 4&-2\\ -3&1\\ \end{array} \right) $$ $$ BB^{-1}=-{1\over2}\left(\begin{array}{cc} 1&2\\ 3&4\\ \end{array}\right) \left(\begin{array}{cc} 4&-2\\ -3&1\\ \end{array}\right)= -{1\over2}\left(\begin{array}{cc} -2&0\\ 0&-2\\ \end{array}\right)= \left(\begin{array}{cc} 1&0\\ 0&1\\ \end{array}\right) $$ \end{enumerate} \vfill \leftline{\textit{ by Jason Janesky and Corinne Manogue\hfill}} \leftline{\copyright 1998 Corinne A. Manogue} \end{document}