From 7e4569536905722d7d898bb7fe7514a50cb2ac7a Mon Sep 17 00:00:00 2001 From: "Pablo S. Ocal" Date: Sun, 4 Jan 2026 10:34:32 -0800 Subject: [PATCH 01/12] Update chapter2.tex Fixed typo, removed extra =. --- Chapters/chapter2.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chapters/chapter2.tex b/Chapters/chapter2.tex index ca344d4..27b2e7d 100644 --- a/Chapters/chapter2.tex +++ b/Chapters/chapter2.tex @@ -583,7 +583,7 @@ \subsection{Projections and Unit Vectors} compute $s$, we use the fact that the vector ${\rm proj}_\bb\aa - \aa$ (along the dotted line in the diagram) is orthogonal to $\bb$. Thus $({\rm proj}_\bb\aa - \aa)\cdot\bb = 0$, or $(s\bb-\aa)\cdot\bb=0$, or -$(s\bb)\cdot\bb-\aa\cdot\bb=0$, or $s(\bb\cdot\bb)=\aa\cdot\bb=$, or +$(s\bb)\cdot\bb-\aa\cdot\bb=0$, or $s(\bb\cdot\bb)=\aa\cdot\bb$, or $s = (\aa\cdot\bb) / (\bb\cdot\bb) = (\aa\cdot\bb) / \|\bb\|^2$. Thus \begin{equation} \label{eq:projection} From 552e8ed36dcac2ff5296aee9c929abfead464058 Mon Sep 17 00:00:00 2001 From: "Pablo S. Ocal" Date: Sun, 4 Jan 2026 12:31:07 -0800 Subject: [PATCH 02/12] Update chapter2.tex Replaced round brackets with square brackets, for consistency. To do: tikz Figure 2.8. --- Chapters/chapter2.tex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Chapters/chapter2.tex b/Chapters/chapter2.tex index 27b2e7d..5bdc3e4 100644 --- a/Chapters/chapter2.tex +++ b/Chapters/chapter2.tex @@ -217,12 +217,12 @@ \subsection{Co-ordinates} \begin{example} \label{2008_a1_1} -Sketch axes $x_1$-$x_2$. Add the vectors (1,1) and (2,-1) to +Sketch axes $x_1$-$x_2$. Add the vectors $[1,1]$ and $[2,-1]$ to your sketch. Draw these vectors with base point at the origin. Now add -the vector (1,-2) to your sketch, starting at the base point -(1,1). That is, draw the vector with components 1 to the right and 2 -down starting at (1,1). {\bf Note:}\ your sketch should show -graphically that (1,1)+(1,-2)=(2,-1). {\rm See Figure~\ref{ch2exnew2}.} +the vector $[1,-2]$ to your sketch, starting at the base point +$[1,1]$. That is, draw the vector with components 1 to the right and 2 +down starting at $[1,1]$. {\bf Note:}\ your sketch should show +graphically that $[1,1]+[1,-2]=[2,-1]$. {\rm See Figure~\ref{ch2exnew2}.} \end{example} \begin{figure}[htb] From c186badb95b641f33926c48d2078563bebb637b9 Mon Sep 17 00:00:00 2001 From: "Pablo S. Ocal" Date: Sun, 4 Jan 2026 20:51:16 -0800 Subject: [PATCH 03/12] Update chapter2.tex Readability updates to the Matlab section 2.2.4. --- Chapters/chapter2.tex | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Chapters/chapter2.tex b/Chapters/chapter2.tex index 5bdc3e4..5e85ee0 100644 --- a/Chapters/chapter2.tex +++ b/Chapters/chapter2.tex @@ -309,16 +309,17 @@ \subsection{MATLAB: basic scalar and vector operations} c = b+b2; \end{verbatim} The first two lines above assign a new scalar and vector. The third line -prints out the answer 7 (2+5). The last line assigns the resulting vector -[3 11] ([1 2] + [2 9]) to the new vector {\tt c} but prints nothing. +prints out the answer 7, namely $2+5$. The last line assigns the resulting vector +{\tt [3 11]}, namely {\tt [1 2] + [2 9]}, to the new vector {\tt c} but prints nothing. \item[{\bf scalar multiplication}] Scalar multiplication (of vectors and -other scalars) is implemented using the ``*" command. Using the variables +other scalars) is implemented using the ``$*$" command. Using the variables defined above, \begin{verbatim} a*a2 a*b \end{verbatim} -would result in 10 (2 times 5) and [2 4] (2 times [1 2]). The ``*" command +would result in 10, namely 2 times 5, and {\tt [2 4]}, namely 2 times {\tt [1 2]}. +The ``$*$" command also implements matrix-vector and matrix-matrix multiplication discussed later in the course. Vector-vector multiplication (dot products and cross products) are implemented using different commands as discussed in the @@ -338,7 +339,7 @@ \subsection{MATLAB: basic scalar and vector operations} \begin{verbatim} sqrt([1 4]) \end{verbatim} -will produce the vector [1 2]. +will produce the vector {\tt [1 2]}. \end{description} \subsection{Problems} From 9d07b36179761b83d1a031106468eb13f3b174ca Mon Sep 17 00:00:00 2001 From: "Pablo S. Ocal" Date: Sun, 4 Jan 2026 20:59:35 -0800 Subject: [PATCH 04/12] Update chapter2.tex Updated the display of caret within \tt environment to improve readability, in Matlab section 2.3.4. --- Chapters/chapter2.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chapters/chapter2.tex b/Chapters/chapter2.tex index 5e85ee0..587e257 100644 --- a/Chapters/chapter2.tex +++ b/Chapters/chapter2.tex @@ -656,7 +656,7 @@ \subsection{MATLAB: {\tt norm} and {\tt dot} commands} (dot(a,b)/norm(b)^2))*b \end{verbatim} where {\tt /} denotes division (of scalar quantities in this case) and -{\tt \^\ p} gives the p'th power of a quantity. +{\tt \textasciicircum p} gives the p'th power of a quantity. \subsection{Problems} From 2aae42376da6f5ed8ba0f1f6450df80052205720 Mon Sep 17 00:00:00 2001 From: "Pablo S. Ocal" Date: Sun, 4 Jan 2026 21:10:37 -0800 Subject: [PATCH 05/12] Update chapter2.tex Readability updates to Matlab section 2.4.4 and 2.4.6, source code readability updates to Matlab section 2.4.5. --- Chapters/chapter2.tex | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/Chapters/chapter2.tex b/Chapters/chapter2.tex index 587e257..f76b40f 100644 --- a/Chapters/chapter2.tex +++ b/Chapters/chapter2.tex @@ -1188,14 +1188,14 @@ \subsection{MATLAB: assigning matrices and {\tt det} and {\tt cross} \begin{verbatim} cross([1 0 0],[0 1 0]) \end{verbatim} -gives the vector result [0 0 1]. +gives the vector result {\tt [0 0 1]}. \item[{\bf matrices:}] The syntax to generate a matrix is shown below using a $2 \times 2$ example \begin{verbatim} a = [1 2; 3 4] \end{verbatim} -This command assigns a matrix to {\tt a} that has the vector [1 2] in its -first row and [3 4] in its second. Entries of a matrix can be accessed +This command assigns a matrix to {\tt a} that has the vector {\tt [1 2]} in its +first row and {\tt [3 4]} in its second. Entries of a matrix can be accessed individually, for example {\tt a(1,2)} is the entry in the first row, second column. \item[{\tt zeros}:] Many applications can lead to large @@ -1216,7 +1216,7 @@ \subsection{MATLAB: assigning matrices and {\tt det} and {\tt cross} is a column vector of length $m$ with all zero entries. \item[{\tt rand}:] {\tt rand (n,m)} generates a matrix with $n$ rows and $m$ columns with entries that are random numbers -uniformly distributed in the interval [0,1]. +uniformly distributed in the interval {\tt [0,1]}. \item[{\tt det}:] The command {\tt det(a)} returns the determinant of the matrix {\tt a}. An error occurs if {\tt a} is not a square (same number of rows and columns) matrix. Determinants of @@ -1226,7 +1226,14 @@ \subsection{MATLAB: assigning matrices and {\tt det} and {\tt cross} \subsection{MATLAB: generating scripts with the MATLAB editor} -Often times using the command window in MATLAB to solve a problem can be tedious, because if the need arises to redo the problem, or change a parameter, one has to rewrite it all. The editor comes in handy for such cases. The editor is a text window (accessed from the command window: {\tt File $\rightarrow$ New $\rightarrow$ Blank M-file}) where one can write commands in the same syntax as the editor, and when one runs it, the results appear in the command window exactly as if one had written them there one after the other. +Often times using the command window in MATLAB to solve a problem can be tedious, +because if the need arises to redo the problem, or change a parameter, +one has to rewrite it all. The editor comes in handy for such cases. +The editor is a text window (accessed from the command window: +{\tt File $\rightarrow$ New $\rightarrow$ Blank M-file}) where one can write +commands in the same syntax as the editor, and when one runs it, +the results appear in the command window exactly as if one had written them +there one after the other. For example, the code to generate three random orthogonal vectors would look something like this: \begin{verbatim} @@ -1238,7 +1245,14 @@ \subsection{MATLAB: generating scripts with the MATLAB editor} dot(a1,a3) dot(a2,a3) \end{verbatim} -Note that the last three lines are there to check that the three vectors are mutually orthogonal. Once the code was written, save it from the editor window: {\tt File $\rightarrow$ Save as}, making sure that the name of the file has a ``{\tt .m}'' extension (and the file name should contain no spaces). There are several different ways of running the script, the fastest one is to hit the {\tt F5} key. Alternatively, from the editor window it can be run from {\tt Debug $\rightarrow$ Run}, or directly from the command window by typing the name of the script into the MATLAB command line. +Note that the last three lines are there to check that the three vectors are +mutually orthogonal. Once the code was written, save it from the editor window: +{\tt File $\rightarrow$ Save as}, making sure that the name of the file has a +``{\tt .m}'' extension (and the file name should contain no spaces). +There are several different ways of running the script, the fastest one is to hit +the {\tt F5} key. Alternatively, from the editor window it can be run from +{\tt Debug $\rightarrow$ Run}, or directly from the command window by typing +the name of the script into the MATLAB command line. \subsection{MATLAB: floating point representation of real numbers} \label{sec:floating} @@ -1252,8 +1266,8 @@ \subsection{MATLAB: floating point representation of real numbers} \begin{example} Consider the vectors \begin{eqnarray*} -{\bf a} & = & [1 \; 1 \; 1] \\ -{\bf b} & = & [\sqrt{2} \; \sqrt{2} \; 0] +{\bf a} & = & [1 \quad 1 \quad 1] \\ +{\bf b} & = & [\sqrt{2} \quad \sqrt{2} \quad 0] \end{eqnarray*} and ${\bf c} = {\bf a} + {\bf b}$. If a $3 \times 3$ matrix $A$ is made with rows ${\bf a}$, ${\bf b}$ and ${\bf c}$ then From a708f0a01684ccecc3e7299e48c58b068101f0b3 Mon Sep 17 00:00:00 2001 From: "Pablo S. Ocal" Date: Sun, 4 Jan 2026 21:11:59 -0800 Subject: [PATCH 06/12] Update chapter2.tex Replaced double quotes " for two single quotes '' throughout chapter 2 for consistency. --- Chapters/chapter2.tex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Chapters/chapter2.tex b/Chapters/chapter2.tex index f76b40f..15de63b 100644 --- a/Chapters/chapter2.tex +++ b/Chapters/chapter2.tex @@ -276,7 +276,7 @@ \subsection{MATLAB: basic scalar and vector operations} you can type MATLAB commands directly. Some basic commands are given below \begin{description} \item[{\bf assignment:}] Scalar and vector variables can be assigned -using the ``=" operator. For example +using the ``='' operator. For example \begin{verbatim} a = 2 \end{verbatim} @@ -300,7 +300,7 @@ \subsection{MATLAB: basic scalar and vector operations} Note also that there are no special distinctions between the names of scalar and vector variables. \item[{\bf addition:}] Both scalar and vector addition can be done with -the ``+" operator. Keeping the values of scalar {\tt a} and vector {\tt b} +the ``+'' operator. Keeping the values of scalar {\tt a} and vector {\tt b} above, we enter the commands \begin{verbatim} a2 = 5; @@ -312,14 +312,14 @@ \subsection{MATLAB: basic scalar and vector operations} prints out the answer 7, namely $2+5$. The last line assigns the resulting vector {\tt [3 11]}, namely {\tt [1 2] + [2 9]}, to the new vector {\tt c} but prints nothing. \item[{\bf scalar multiplication}] Scalar multiplication (of vectors and -other scalars) is implemented using the ``$*$" command. Using the variables +other scalars) is implemented using the ``$*$'' command. Using the variables defined above, \begin{verbatim} a*a2 a*b \end{verbatim} would result in 10, namely 2 times 5, and {\tt [2 4]}, namely 2 times {\tt [1 2]}. -The ``$*$" command +The ``$*$'' command also implements matrix-vector and matrix-matrix multiplication discussed later in the course. Vector-vector multiplication (dot products and cross products) are implemented using different commands as discussed in the @@ -1258,7 +1258,7 @@ \subsection{MATLAB: floating point representation of real numbers} \label{sec:floating} MATLAB can represent integers exactly (up to limited but large size). Using a -``floating point representation", MATLAB can represent +``floating point representation'', MATLAB can represent most real numbers only approximately (but quite accurately - to 16 digits or so). In certain cases, the errors made in floating point approximation of numbers can be amplified and lead to noticeable errors in computed results. This will not happen typically in the From b47a86ab0bde423678994b4a244e406fa3220979 Mon Sep 17 00:00:00 2001 From: "Pablo S. Ocal" Date: Sun, 4 Jan 2026 21:37:30 -0800 Subject: [PATCH 07/12] Update chapter2.tex Replaced round brackets with square brackets, for consistency, in problems 2.2.5, example 2.5, problems 2.3.5, example 2.11, example 2.12, and problems 2.4.7. --- Chapters/chapter2.tex | 62 +++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/Chapters/chapter2.tex b/Chapters/chapter2.tex index 15de63b..229c792 100644 --- a/Chapters/chapter2.tex +++ b/Chapters/chapter2.tex @@ -345,13 +345,13 @@ \subsection{MATLAB: basic scalar and vector operations} \subsection{Problems} \begin{problem} - \label{2009_a1_1} -Sketch axes $x_1$-$x_2$. Add the vectors (2,2) and (1,-1) to +\label{2009_a1_1} +Sketch axes $x_1$-$x_2$. Add the vectors $[2,2]$ and $[1,-1]$ to your sketch. Draw these vectors with base point at the origin. Now add -the vector (1,-1) to your sketch, starting at the base point -(2,2). That is, draw the vector with components 1 to the right and 1 -down starting at (2,2). {\bf Note:}\ your sketch should show -graphically that (2,2)+(1,-1)=(3,1). +the vector $[1,-1]$ to your sketch, starting at the base point +$[2,2]$. That is, draw the vector with components 1 to the right and 1 +down starting at $[2,2]$. {\bf Note:}\ your sketch should show +graphically that $[2,2]+[1,-1]=[3,1]$. \end{problem} \begin{problem} @@ -544,8 +544,8 @@ \subsection{The dot product} Here is an example to review the basic operations on vectors we know so far. \begin{example} % \label{2008_a1_2} -Consider the vectors ${\bf a} = (2,3)$ and ${\bf b} = -(1,-3)$ in $\mathbb{R}^2$. Compute the following: +Consider the vectors ${\bf a} = [2,3]$ and ${\bf b} = +[1,-3]$ in $\mathbb{R}^2$. Compute the following: {\begin{enumerate} \renewcommand{\labelenumi}{(\alph{enumi})} \item ${\bf a} + {\bf b}$ @@ -557,10 +557,10 @@ \subsection{The dot product} {\rm Solutions: \begin{enumerate} \renewcommand{\labelenumi}{(\alph{enumi})} -\item $\aa + \bb = (2,3)+(1,-3) = (3,0)$ -\item $3 \aa = 3 (2,3) = (6,9)$ -\item $2\aa + 4\bb = 2(2,3) + 4(-1,3) = (4,6)+(4,-12) = (8,-6)$ -\item $\aa \cdot \bb = (2,3) \cdot (1,-3) = 2-9 = -7$. +\item $\aa + \bb = [2,3]+[1,-3] = [3,0]$ +\item $3 \aa = 3 [2,3] = [6,9]$ +\item $2\aa + 4\bb = 2[2,3] + 4[-1,3] = [4,6]+[4,-12] = [8,-6]$ +\item $\aa \cdot \bb = [2,3] \cdot [1,-3] = 2-9 = -7$. \item $\| \bb \| = \sqrt{1^2 + (-3)^2} = \sqrt{10}$. \end{enumerate}} \end{example} @@ -661,9 +661,9 @@ \subsection{MATLAB: {\tt norm} and {\tt dot} commands} \subsection{Problems} \begin{problem} - \label{2009_a1_2} -Consider the vectors ${\bf a} = (1,2)$ and ${\bf b} = -(1,-2)$ in $\mathbb{R}^2$ (the set of vectors with 2 components). +\label{2009_a1_2} +Consider the vectors ${\bf a} = [1,2]$ and ${\bf b} = +[1,-2]$ in $\mathbb{R}^2$ (the set of vectors with 2 components). Compute the following: \begin{enumerate} \item ${\bf a} + {\bf b}$ @@ -676,9 +676,9 @@ \subsection{Problems} \begin{problem} \label{2008_a1_3} -A circle in the $x_1$-$x_2$ plane has centre at (2,5). A given -point on its circumference is (3,3). Write an equation that describes -all the points $(x_1,x_2)$ on the circle. +A circle in the $x_1$-$x_2$ plane has centre at $[2,5]$. A given +point on its circumference is $[3,3]$. Write an equation that describes +all the points $[x_1,x_2]$ on the circle. \end{problem} \begin{problem} @@ -710,7 +710,7 @@ \subsection{Problems} \begin{problem} \label{2009_a1_4} -Let ${\bf a} = (1,1,1)$ and ${\bf b} = (3,1,-2)$. Compute the +Let ${\bf a} = [1,1,1]$ and ${\bf b} = [3,1,-2]$. Compute the following: \begin{enumerate} \item The angle between ${\bf a}$ and ${\bf b}$. @@ -721,7 +721,7 @@ \subsection{Problems} \begin{problem} \label{2008_a1_5} -Let ${\bf a} = (1,4,0)$ and ${\bf b} = (2,-1,5)$. Compute the +Let ${\bf a} = [1,4,0]$ and ${\bf b} = [2,-1,5]$. Compute the following: {\begin{enumerate} \renewcommand{\labelenumi}{(\alph{enumi})} @@ -746,7 +746,7 @@ \subsection{Problems} \begin{problem} \label{2009_a1_5} Determine the values of $c_1$ and $c_2$ such that the vector -[$c_1$ 1 $c_2$] is a scalar multiple of [2 -2 3]. +$[c_1,1,c_2]$ is a scalar multiple of $[2,-2,3]$. \end{problem} \begin{problem} @@ -1057,7 +1057,7 @@ \subsection{The cross product} \end{enumerate} \begin{example} -\label{2008_a2_2} Let $\aa = (1,3,-2)$ and $\bb = (-1,2,3)$. Compute +\label{2008_a2_2} Let $\aa = [1,3,-2]$ and $\bb = [-1,2,3]$. Compute the following: {\begin{enumerate} \renewcommand{\labelenumi}{(\alph{enumi})} @@ -1075,7 +1075,7 @@ \subsection{The cross product} 1 & 3 & -2 \\ -1 & 2 & 3 \end{array} \right| = \hat{i} (9+4) + \hat{j} (2-3) + \hat{k}(2+3) - = (13,-1,5) + = [13,-1,5] \] so the area is \[ @@ -1090,7 +1090,7 @@ \subsection{The cross product} angles between vectors unless you really know what you are doing: \[ \cos \theta = \frac{\aa \cdot \bb}{\| \aa \| \| \bb \|} = -\frac{(1,3,-2)\cdot (-1,2,3)}{\|(1,3,-2)\| \|(-1,2,3)\|} +\frac{[1,3,-2]\cdot [-1,2,3]}{\|[1,3,-2]\| \|[-1,2,3]\|} = \frac{-1+6-6}{\sqrt{1+9+4} \sqrt{1+4+9}} = \frac{-1}{14} \] so @@ -1102,21 +1102,21 @@ \subsection{The cross product} \end{example} \begin{example} -Consider the triangle $T$ with three corners $(1,1,1)$, $(1,2,3)$ and $(2,0,1)$. Find the +Consider the triangle $T$ with three corners $[1,1,1]$, $[1,2,3]$ and $[2,0,1]$. Find the area of $T$. {\rm The area will be half of the area of the parallelogram spanned by (any) two -distinct sides. We take sides $(1,2,3)-(1,1,1) = (0,1,2)$ and $(2,0,1) -(1,1,1) = (1,-1,0)$ +distinct sides. We take sides $[1,2,3]-[1,1,1] = [0,1,2]$ and $[2,0,1]-[1,1,1] = [1,-1,0]$ which make the computations a bit easier. We compute \[ -(0,1,2) \times (1,-1,0) = \det \left[ \begin{array}{ccc} +[0,1,2] \times [1,-1,0] = \det \left[ \begin{array}{ccc} \hat{i} & \hat{j} & \hat{k} \\ 0 & 1 & 2 \\ 1 & -1 & 0 -\end{array} \right] = (2, 2,-1) +\end{array} \right] = [2,2,-1] \] and then the area of the triangle is \[ -1/2 \| (2,2,-1) \| = 3/2. +1/2 \| [2,2,-1] \| = 3/2. \] } \end{example} @@ -1323,8 +1323,8 @@ \subsection{Problems} \label{2008_a2_1} Simplify each of the following expressions: {\begin{enumerate} \renewcommand{\labelenumi}{(\alph{enumi})} -\item $((1,4,-1)\cdot(2,1,3)) ((2,1,4) \times (1,4,9))$ -\item $(7,1,0)\cdot ((2,0,-1) \times (1,4,3))$ +\item $([1,4,-1]\cdot[2,1,3]) ([2,1,4] \times [1,4,9])$ +\item $[7,1,0]\cdot ([2,0,-1] \times [1,4,3])$ \item $(\aa \times \bb) \times (\bb \times \aa)$ \end{enumerate}} \end{problem} From 1c091a2ba8f7caefc603c0d25d2906b96f54d52e Mon Sep 17 00:00:00 2001 From: "Pablo S. Ocal" Date: Sun, 4 Jan 2026 21:39:16 -0800 Subject: [PATCH 08/12] Update chapter2.tex Attempt at fixing the readability of problem 2.20. Vectors rewritten in math and commas added between the entries. --- Chapters/chapter2.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chapters/chapter2.tex b/Chapters/chapter2.tex index 229c792..1afd853 100644 --- a/Chapters/chapter2.tex +++ b/Chapters/chapter2.tex @@ -1310,7 +1310,7 @@ \subsection{Problems} \] Do the computation by hand showing your work, but you can check your result using MATLAB. -From your result, decide if the vectors [1 1 1], [1 2 3] and [1 0 -1] +From your result, decide if the vectors $[1,1,1]$, $[1,2,3]$ and $[1,0,-1]$ lie in the same plane (justify your answer, very briefly). \end{problem} From 37fcb8cb296510f6ca516d6009b625345ba89652 Mon Sep 17 00:00:00 2001 From: "Pablo S. Ocal" Date: Sun, 4 Jan 2026 21:41:06 -0800 Subject: [PATCH 09/12] Update chapter2.tex Readability updates to source code. --- Chapters/chapter2.tex | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Chapters/chapter2.tex b/Chapters/chapter2.tex index 1afd853..a5b6223 100644 --- a/Chapters/chapter2.tex +++ b/Chapters/chapter2.tex @@ -1344,8 +1344,11 @@ \subsection{Problems} \begin{problem} \label{matlab_op1_15} -(Matlab) The Matlab command {\tt a=rand(1,n)} generates an $n\times 1$ vector with random entries. Write a script that generates three random vectors and write what you obtain from $\aa\times\bb-\bb\times\aa$, -and from $\aa\times(\bb\times\cc)-(\aa\times\bb)\times\cc$. Does that constitute a proof? +(Matlab) The Matlab command {\tt a=rand(1,n)} generates an $n\times 1$ +vector with random entries. Write a script that generates three random vectors +and write what you obtain from $\aa\times\bb-\bb\times\aa$, +and from $\aa\times(\bb\times\cc)-(\aa\times\bb)\times\cc$. +Does that constitute a proof? \end{problem} \begin{problem} @@ -1355,7 +1358,9 @@ \subsection{Problems} \begin{problem} \label{matlab_op1_16} -(Matlab) Write a script that generates three random vectors and checks that the result from problem \ref{op1_16} holds: $\aa\times(\bb\times\cc)=(\aa\cdot\cc)\bb-(\aa\cdot\bb)\cc$. +(Matlab) Write a script that generates three random vectors and checks +that the result from problem \ref{op1_16} holds: +$\aa\times(\bb\times\cc)=(\aa\cdot\cc)\bb-(\aa\cdot\bb)\cc$. \end{problem} \begin{problem} From b48e1aef40441b4ab94dc5340c64e7a25f83e3b5 Mon Sep 17 00:00:00 2001 From: "Pablo S. Ocal" Date: Sun, 4 Jan 2026 21:46:18 -0800 Subject: [PATCH 10/12] Update chapter2.tex Fixed typos, edited math command so that the projection vector is displayed as intended in the compiled pdf. --- Chapters/chapter2.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Chapters/chapter2.tex b/Chapters/chapter2.tex index a5b6223..890f4f2 100644 --- a/Chapters/chapter2.tex +++ b/Chapters/chapter2.tex @@ -1259,7 +1259,7 @@ \subsection{MATLAB: floating point representation of real numbers} MATLAB can represent integers exactly (up to limited but large size). Using a ``floating point representation'', MATLAB can represent -most real numbers only approximately (but quite accurately - to 16 digits or so). In certain +most real numbers only approximately (but quite accurately --- to 16 digits or so). In certain cases, the errors made in floating point approximation of numbers can be amplified and lead to noticeable errors in computed results. This will not happen typically in the examples and computer labs for Math 152, but the reader should be aware of the possibility. @@ -1377,7 +1377,7 @@ \subsection{Problems} $\aa \times (\aa \times \bb)$. Assume that $\aa$ and $\bb$ lie in the plane of the paper and have an acute angle between them. \item Find a formula for $\aa \times (\aa \times \bb)$ which -involves only $\| a \|$, $\bb$ and $\mbox{proj}_\aa \bb$. {\em Hint:} +involves only $\| \aa \|$, $\bb$ and ${\rm proj}_\aa \bb$. {\em Hint:} use a property of the dot product. \end{enumerate}} \end{problem} From 7d6417dc09ba4b4aae6c18aae881258b63eed3ed Mon Sep 17 00:00:00 2001 From: "Pablo S. Ocal" Date: Thu, 15 Jan 2026 07:35:36 -0800 Subject: [PATCH 11/12] Update chapter2.tex Fixed typo in Example 2.15 (credit: Anon. Comp on Piazza). --- Chapters/chapter2.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chapters/chapter2.tex b/Chapters/chapter2.tex index 890f4f2..1ba3545 100644 --- a/Chapters/chapter2.tex +++ b/Chapters/chapter2.tex @@ -1504,7 +1504,7 @@ \subsection{Lines in two dimensions: Equation form} \] Together with the point (1,2) on the line, we have an equation form \[ --x_1 + 2x_2 = (-2,1) \cdot (1,2) = 0 +-2x_1 + x_2 = (-2,1) \cdot (1,2) = 0 \] } \end{example} From 1fe033871071f9eecdc75dc3e7d626d41c832ea0 Mon Sep 17 00:00:00 2001 From: "Pablo S. Ocal" Date: Thu, 15 Jan 2026 07:37:44 -0800 Subject: [PATCH 12/12] Update chapter2.tex Fixed typo in Example 2.21 (credit: Anon. Comp on Piazza). --- Chapters/chapter2.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chapters/chapter2.tex b/Chapters/chapter2.tex index 1ba3545..50e045f 100644 --- a/Chapters/chapter2.tex +++ b/Chapters/chapter2.tex @@ -1735,7 +1735,7 @@ \subsection{Planes in three dimensions: Equation form} \] leading to a parametric form \[ -{\bf x} = (1,0,0) +s {\bf a_1} + t {\bf a_2} = (1-t, -2s+t, s) . +{\bf x} = (2,0,0) +s {\bf a_1} + t {\bf a_2} = (1-t, -2s+t, s) . \] } \end{example}