ROB-GY 6013 · Mathematics for Robotics · Fall 2026
Which have a positive dot product with $u=(1,0)$? Select all that apply.
$v_D$ points down: why still positive? Longer vector, bigger dot product?
Choices A and D. Choice C is negative, $u^{\mathsf T}v_C=-1$.
$v_D$: $u^{\mathsf T}v_D=1>0$ with $\lVert v_D\rVert=\sqrt{10}$. $v_B$: $\lVert v_B\rVert=3$, $u^{\mathsf T}v_B=0$.
Sign follows $\varphi$: acute $+$, right $0$, obtuse $-$.
Why still positive? The downward part of $v_D$, $(0,-3)$, is orthogonal to $u$ and adds nothing: $u^{\mathsf T}v_D=1\cdot1+0\cdot(-3)$. So the angle $\varphi$ between $u$ and $v_D$ is acute, $\cos\varphi=1/\sqrt{10}$.
Longer vector, bigger dot product? No. $v_A$, with $\lVert v_A\rVert=\sqrt5$, is shorter than $v_B$ and $v_D$, yet has the biggest dot product, $u^{\mathsf T}v_A=2$.
$d_1=(1,0,0)$, $d_2=(0,1,0)$, $S=\text{span}\{d_1,d_2\}$, $r=(0,1,1)$.
$r\perp d_1$. Which is true?
Choice C. $r^{\mathsf T}d_2=1\neq0$, $d_2\in S$: $r\notin S^\perp$.
For contrast, $w=(0,0,1)$ passes both: $w^{\mathsf T}d_1=w^{\mathsf T}d_2=0$.
Choice D fails: $r$ itself passes the $d_1$ test, yet $r\not\perp S$. Choice B fails too: $(r/\lVert r\rVert)^{\mathsf T}d_2=1/\sqrt2\neq0$.
$A=\begin{bmatrix}1&2\\1&0\\0&1\end{bmatrix}$. Find a basis for $\operatorname{Col}(A)^{\perp}$, the vectors orthogonal to all of $\operatorname{Col}(A)$.
$\operatorname{Col}(A)^{\perp}=\operatorname{span}\{(1,-1,-2)^{\mathsf T}\}$, of dimension $1$.
A vector is orthogonal to all of $\operatorname{Col}(A)$ exactly when it is orthogonal to each column, because the columns span that space (the spanning test); and $A^{\mathsf T}r$ is precisely the list of those dot products. So
$$\operatorname{Col}(A)^{\perp}=\operatorname{Null}(A^{\mathsf T}),$$and solving $A^{\mathsf T}r=0$ means $r_1+r_2=0$ and $2r_1+r_3=0$, so $r_2=-r_1$ and $r_3=-2r_1$: every solution is $r_1(1,-1,-2)^{\mathsf T}$. The count works: $\dim\operatorname{Col}(A)=2$, as the columns are independent, and $2+1=3$, the dimension of $\mathbb R^3$.
In $\mathbb R^4$, let
$$q_1=\tfrac12\begin{bmatrix}1\\1\\1\\1\end{bmatrix},\quad q_2=\tfrac12\begin{bmatrix}1\\-1\\1\\-1\end{bmatrix},\quad q_3=\tfrac12\begin{bmatrix}1\\1\\-1\\-1\end{bmatrix},\quad q_4=\tfrac12\begin{bmatrix}1\\-1\\-1\\1\end{bmatrix}.$$They form an orthonormal basis. Write $v=(4,2,0,2)^{\mathsf T}$ in this basis without solving a $4\times4$ system.
$v=4q_1+2q_3+2q_4$. Write $v=\sum_j c_jq_j$ and dot both sides with $q_i$: every cross term dies, since $q_i^{\mathsf T}q_j=0$ for $j\neq i$, and $q_i^{\mathsf T}q_i=1$ leaves $c_i=q_i^{\mathsf T}v$:
$$c_1=\tfrac12(4+2+0+2)=4,\quad c_2=\tfrac12(4-2+0-2)=0,\quad c_3=\tfrac12(4+2-0-2)=2,\quad c_4=\tfrac12(4-2-0+2)=2.$$Pythagoras checks it, as the pieces are orthogonal: $\lVert v\rVert^2=16+4+0+4=24=4^2+0^2+2^2+2^2$.
For $Q=\begin{bmatrix}1&0\\0&1\\0&0\end{bmatrix}$, which are true? Select all that apply.
Which $b'$ have $Q^{\mathsf T}b'=Q^{\mathsf T}b$?
Choices A and C. Choice A: the columns $(1,0,0)$ and $(0,1,0)$ are orthonormal. Choice C follows from it: $\lVert Qz\rVert^2=z^{\mathsf T}Q^{\mathsf T}Qz=z^{\mathsf T}z$.
Choice B: $QQ^{\mathsf T}=\operatorname{diag}(1,1,0)\neq I_3$.
Choice D: $v_3$ is lost: $v=(2,1,2)$ gives $Q^{\mathsf T}v=(2,1)$.
Which $b'$? For any $b\in\mathbb R^3$, exactly $b'=b+(0,0,t)$ with $t\in\mathbb R$: $Q^{\mathsf T}(b'-b)=0$ puts $b'-b$ in $\operatorname{Null}(Q^{\mathsf T})=\operatorname{Col}(Q)^{\perp}=\operatorname{span}\{(0,0,1)\}$. $Q^{\mathsf T}$ keeps $b_1,b_2$ and loses the third entry.
$a=(1,1)^{\mathsf T}$, $b=(3,1)^{\mathsf T}$. Which point on the line $\operatorname{span}\{a\}$ is closest to $b$?
Choice C, the point $(2,2)$. Let $d$ be the distance to $b$; the error from $(2,2)$ to $b$ is $(1,-1)$. $C$: $1^2+1^2=2$, so $d=\sqrt2$. The circle of radius $\sqrt2$ about $b$ touches the line only at $(2,2)$; the one of radius $2$ crosses it at $(1,1)$ and $(3,3)$, and $(0,0)$ is at $d=\sqrt{10}$.
At $C$, what angle does the error segment to $b$ make with the line? A right angle: with $p=(2,2)$, $a^{\mathsf T}(b-p)=1(1)+1(-1)=0$.
$a=(1,1)^{\mathsf T}$, $b=(3,1)^{\mathsf T}$, and $p=\alpha a$ is the projection of $b$ onto $\operatorname{span}\{a\}$. Replace $a$ by $\lambda a$, $\lambda>0$. What happens to $a^{\mathsf T}b$, $\alpha$, $p$?
Choice A. With the ruler $\lambda a$, $a^{\mathsf T}b=4$ becomes $(\lambda a)^{\mathsf T}b=4\lambda$ and $\alpha=2$ becomes $\dfrac{4\lambda}{2\lambda^2}=\dfrac2\lambda$, so $p=\dfrac2\lambda(\lambda a)=(2,2)$ for every $\lambda>0$. The signed shadow $s=(\lambda a)^{\mathsf T}b/\lVert\lambda a\rVert=2\sqrt2$ does not change.
$a^{\mathsf T}b$ grew, $p$ did not. Why? $a^{\mathsf T}b=\lVert a\rVert s$ grows with the ruler; $p=\dfrac{\lambda^2aa^{\mathsf T}}{\lambda^2a^{\mathsf T}a}b$ needs only the line.
$Q$ has orthonormal columns $q_1=\tfrac13(2,2,1)^{\mathsf T}$ and $q_2=\tfrac13(-1,2,-2)^{\mathsf T}$, spanning a plane $S\subset\mathbb R^3$. Take $b=(3,0,0)^{\mathsf T}$.
Compute the coordinates $c=Q^{\mathsf T}b$, the projection $p=Qc$ and the residual $r=b-p$.
Extract, then rebuild: $c=(q_1^{\mathsf T}b,\;q_2^{\mathsf T}b)=\tfrac13(6,-3)^{\mathsf T}=(2,-1)^{\mathsf T}$, and
$$p=2q_1-q_2=\frac13\begin{bmatrix}5\\2\\4\end{bmatrix},\qquad r=b-p=\frac13\begin{bmatrix}4\\-2\\-4\end{bmatrix}.$$Check: $q_1^{\mathsf T}r=(8-4-4)/9=0$ and $q_2^{\mathsf T}r=(-4-4+8)/9=0$. The two columns span $S$, so $r\perp S$ and $p$ is the closest point of $S$ to $b$.
$Q$ has orthonormal columns $q_1=(1,0,0)^{\mathsf T}$ and $q_2=(0,\tfrac45,\tfrac35)^{\mathsf T}$, spanning a plane $S$, and $b=(2,1,2)^{\mathsf T}$. Add $w=(0,-3,4)$, $\perp q_1$ and $q_2$. For $b+w=(2,-2,6)$:
Choice B. $p=QQ^{\mathsf T}b=(2,\tfrac85,\tfrac65)$, $r=b-p=(0,-\tfrac35,\tfrac45)$.
$Q^{\mathsf T}w=0\Rightarrow QQ^{\mathsf T}(b+w)=QQ^{\mathsf T}b$; $r$ becomes $r+w$. Same for every $w\in S^\perp$ (Null$(A^{\mathsf T})$ if $S=$ Col$(A)$).
$\tau\in S$: $QQ^{\mathsf T}(b+\tau)=p+\tau$, $r$ same.
Each of these flattens the plane onto the horizontal axis. Which sends every $v$ to its orthogonal projection? On $v=(1,2)$: does a second pass move $Pv$? Is the discarded direction $\perp$ the axis?
Choice A. On $v=(1,2)$: $P_Av=(1,0)$, $P_Bv=(3,0)$, $P_Cv=(2,0)$, and a second pass moves only $P_Cv$. The residuals $v-Pv$ are $(0,2)$, $(-2,2)$, $(-1,2)$; only the first is $\perp$ the axis, though $P_C$ also sends $e_2$ to $0$: it fails by doubling what it keeps. $P_A$ leaves the residual $(0,v_2)$, $\perp$ the axis, for every $v$.
A discards $e_2$, $\perp$ the axis. B discards $(1,-1)$: oblique, though $P_B^2=P_B$. C: $P(Pv)=(4,0)\neq Pv$.
The $\perp$ residual decides; idempotence alone is not enough.
$b=(3,1)$. Candidates $y=(t,t)$, $d(t)=\lVert b-y\rVert_2$.
We minimise $d^2$ instead of $d$. Does the best $t$ move?
Choice B, no. The best $t$ is $2$ for both: $d(t)^2=(3-t)^2+(1-t)^2=2(t-2)^2+2$ is smallest at $t=2$.
Same argmin, different min: $\min d=\sqrt2$, $\min d^2=2$. Squaring is strictly increasing on $[0,\infty)$, so it keeps the order of distances.
$A=\begin{bmatrix}1&0\\1&1\\1&2\end{bmatrix}$, $b=(1,2,2)$. For $y_i\approx\beta_0+\beta_1t_i$, which errors does ordinary least squares minimize? In each option the distances run from the data points $(t_i,y_i)=(0,1),(1,2),(2,2)$ to one candidate line.
Choice A: vertical distances, squared.
Model: $t_i$ exact, all error in $y_i$, so $r_i$ = reading − model at $t_i$: vertical. Stacked, one arrow in $\mathbb R^3$: at the best fit $r=b-A\hat x\perp\operatorname{Col}(A)$.
From Lecture 1: for $G=A^{\mathsf T}A$ with columns $a_1,a_2$, the entry is $G_{ij}=a_i^{\mathsf T}a_j$.
$a_2$ is turned until perpendicular to $a_1$ and then doubled in length. What happens to $G_{11},G_{12},G_{22}$?
Choice A: unchanged, $0$, $\times4$. Take the columns of $A$ to start at $a_1=(2,0)$ and $a_2=(1,1)$, $45^\circ$ apart; turned and doubled, $a_2$ ends at $(0,2\sqrt2)$:
$$\begin{array}{lccc} & G_{11} & G_{12} & G_{22}\\ 45^\circ & 4 & 2 & 2\\ \perp,\ \times2 & 4 & 0 & 8\end{array}$$$A$ is $3\times2$, all ones; $b=(1,2,3)$. Move $x$ along $z=(1,-1)$. Which change? Select all that apply.
Only choice A, the parameters. Not choice B: $A(x+z)=Ax$. Not choice C: $Ax$ fixed. Not choice D: $f=\lVert r\rVert^2$.
At $x=(1,1)$ and at $x+z=(2,0)$: $Ax=(2,2,2)$ and $r=(-1,0,1)$, perpendicular to $\operatorname{Col}(A)$, so $f=\lVert r\rVert^2=2$ is the minimum.
Steps leaving $Ax$ fixed are exactly $\operatorname{Null}(A)=\operatorname{span}\{(1,-1)\}$: dependent columns leave least squares solvable — minimisers fill $(1,1)+\operatorname{Null}(A)$, one $\hat b$.
$\hat x$ solves $A^{\mathsf T}A\hat x=A^{\mathsf T}b$. For every $A$, which is guaranteed? $\hat x$ is…
Choice A, a global minimiser. Not choice B: never lower. With $r=b-A\hat x$, every step $z$ gives $A(\hat x+z)-b=Az-r$, so
$$\lVert Az-r\rVert^2=\lVert Az\rVert^2-2z^{\mathsf T}(A^{\mathsf T}r)+\lVert r\rVert^2=\lVert r\rVert^2+\lVert Az\rVert^2\ge\lVert r\rVert^2,$$because the cross term is $0$: $A^{\mathsf T}r=0$ is the equation $\hat x$ solves. Equality exactly when $Az=0$. Not choice C: it holds exactly when $\operatorname{Null}(A)=\{0\}$.
A, for every $A$: nothing gets below $\lVert r\rVert^2$. C is conditional, not false — it needs $\operatorname{Null}(A)=\{0\}$, and Problem 4 had a line of ties.
$q_1=(1,0)$, $a_2=(1,1)$. Sketch each result: which removes exactly the part along $q_1$?
Choice A, which gives $(0,1)$. Choice B gives $(1-\sqrt2,1)$, Choice C gives $(1/\sqrt2,1/\sqrt2)$, Choice D gives $(2,1)$.
$q_1^{\mathsf T}a_2$ is signed; the shadow’s length is $|q_1^{\mathsf T}a_2|$. $a_2'=(-1,1)$: $q_1^{\mathsf T}a_2'=-1$, $a_2'-q_1(-1)=a_2'+q_1=(0,1)$.
Run Gram–Schmidt on $a_1=(1,1,0)^{\mathsf T}$ and $a_2=(2,0,1)^{\mathsf T}$. What are $q_1$ and $q_2$?
$q_1=(1,1,0)^{\mathsf T}/\sqrt2$ and $q_2=(1,-1,1)^{\mathsf T}/\sqrt3$.
$\lVert a_1\rVert=\sqrt2\neq0$, so $q_1=(1,1,0)^{\mathsf T}/\sqrt2$. The coefficient is $q_1^{\mathsf T}a_2=2/\sqrt2=\sqrt2$, and the projection it names is $q_1(q_1^{\mathsf T}a_2)=(1,1,0)^{\mathsf T}$.
$$u_2=\begin{bmatrix}2\\0\\1\end{bmatrix}-\begin{bmatrix}1\\1\\0\end{bmatrix}=\begin{bmatrix}1\\-1\\1\end{bmatrix},\qquad\lVert u_2\rVert=\sqrt3,\qquad q_2=\frac{1}{\sqrt3}\begin{bmatrix}1\\-1\\1\end{bmatrix}$$The usual slip is subtracting $\sqrt2\,a_1$ rather than $\sqrt2\,q_1$, which leaves $(2-\sqrt2,-\sqrt2,1)^{\mathsf T}$, not perpendicular to $a_1$.
Same $a_1,a_2$, and a third column $a_3=(4,2,1)^{\mathsf T}$. Write $a_3$ in terms of $q_1,q_2$, using the coefficients $q_1^{\mathsf T}a_3$ and $q_2^{\mathsf T}a_3$ that the step at $j=3$ computes.
$a_3=3\sqrt2\,q_1+\sqrt3\,q_2$. $q_1^{\mathsf T}a_3=6/\sqrt2=3\sqrt2$, so the first projection is $(3,3,0)^{\mathsf T}$; $q_2^{\mathsf T}a_3=3/\sqrt3=\sqrt3$, so the second is $(1,-1,1)^{\mathsf T}$. They add up to $a_3$, so $u_3=(0,0,0)^{\mathsf T}$ and there is no $q_3$: this $a_3$ falls outside the procedure's scope of independent columns, the case the next problem takes up.
The numbers $3\sqrt2$ and $\sqrt3$ are coordinates along the $q$'s, not weights on the $a$'s: $3\sqrt2\,a_1+\sqrt3\,a_2\neq a_3$.
Gram–Schmidt runs on $a_1,a_2,a_3$ in $\mathbb R^3$; $a_3$ starts above the plane spanned by $q_1$ and $q_2$, directly over the point $1.5q_1+0.6q_2$. Lower $a_3$ into the plane: which hits 0, $a_3$ or $u_3$?
$u_3=0$ means:
Choice B. $u_3$ hits 0; $a_3$ does not: it ends at $1.5q_1+0.6q_2$, of length about $1.62$.
No $q_3$ out of it: that column added no new direction, not that the space has none.
Floating point: exact $0$ is rare; a tiny $\lVert u_3\rVert/\lVert a_3\rVert$ ($a_3\neq0$) shows near-dependence, not exact dependence.
Run Gram–Schmidt on $a_1=(1,1,0)^{\mathsf T}$, $a_2=(2,2,0)^{\mathsf T}$, $a_3=(0,1,1)^{\mathsf T}$, skipping any column whose remainder is zero and carrying on. Which orthonormal vectors do you end with?
$q_1=(1,1,0)^{\mathsf T}/\sqrt2$ and $q_2=(-1,1,2)^{\mathsf T}/\sqrt6$, from columns 1 and 3. $q_1^{\mathsf T}a_2=4/\sqrt2=2\sqrt2$, whose projection $(2,2,0)^{\mathsf T}$ is $a_2$ itself, so $u_2=0$ and $a_2$ is skipped. At $j=3$, $q_1^{\mathsf T}a_3=1/\sqrt2$, so $u_3=\tfrac12(-1,1,2)^{\mathsf T}$: the third column supplies the second $q$.
They are an orthonormal basis of the plane the list spans, not of $\mathbb R^3$. A rule that halts at $u_2=0$ keeps only $q_1$ and misses the direction $a_3$ adds.
Gram–Schmidt on the columns of $A$, in order, gives $q_1$ and $q_2$:
$$A=\begin{bmatrix}1&2\\1&0\\0&1\end{bmatrix},\qquad q_1=\tfrac{1}{\sqrt2}\begin{bmatrix}1\\1\\0\end{bmatrix},\qquad q_2=\tfrac{1}{\sqrt3}\begin{bmatrix}1\\-1\\1\end{bmatrix}.$$In the thin factorization $A=QR$ with $Q=[\,q_1\ q_2\,]$, what is $R$?
Since $Q^{\mathsf T}Q=I_2$, multiplying $A=QR$ by $Q^{\mathsf T}$ gives $R=Q^{\mathsf T}A$, whose $(i,j)$ entry is $q_i^{\mathsf T}a_j$: $q_1^{\mathsf T}a_1=q_1^{\mathsf T}a_2=2/\sqrt2$ and $q_2^{\mathsf T}a_2=3/\sqrt3$. The zero below the diagonal is structural: $a_1$ lies along $q_1$, and $q_2\perp q_1$. The diagonal entries $r_{jj}=\lVert u_j\rVert$ are positive because the columns of $A$ are independent, so $\det R=\sqrt2\cdot\sqrt3\neq0$ and $R$ is invertible.
Same $A$, with $b=(2,2,3)^{\mathsf T}$. Fit it by thin QR, and report $\hat x$, the residual $r=b-A\hat x$ and $\lVert r\rVert$.
$\hat x=(1,1)^{\mathsf T}$, with $r=(-1,1,2)^{\mathsf T}$ and $\lVert r\rVert=\sqrt6$.
In $\lVert Ax-b\rVert^2=\lVert Rx-Q^{\mathsf T}b\rVert^2+\lVert(I-QQ^{\mathsf T})b\rVert^2$, $R$ is invertible, so the first part reaches zero at $R\hat x=Q^{\mathsf T}b$:
$$\begin{bmatrix}\sqrt2&\sqrt2\\0&\sqrt3\end{bmatrix}\hat x =\begin{bmatrix}2\sqrt2\\\sqrt3\end{bmatrix},$$solved from the bottom row up. Then $A\hat x=(3,1,1)^{\mathsf T}$, and $\lVert r\rVert^2=\lVert b\rVert^2-\lVert Q^{\mathsf T}b\rVert^2=17-11=6$, the part no $x$ can touch.
A planar two-link arm has its tip at $(1,1)^{\mathsf T}$ and Jacobian $J=\begin{bmatrix}-1&-1\\1&0\end{bmatrix}$. The target is $(1,\tfrac{9}{10})^{\mathsf T}$, so the task error is $e=(0,\tfrac{1}{10})^{\mathsf T}$. Solve the one-step problem $\min_{\Delta\theta}\lVert J\Delta\theta+e\rVert^2$ for $\Delta\theta$.
$\Delta\theta=(-\tfrac{1}{10},\tfrac{1}{10})^{\mathsf T}$ radians.
$J\Delta\theta+e=J\Delta\theta-(-e)$, so against $r=b-Ax$ the reading is $A=J$, $x=\Delta\theta$, $b=-e$, not $e$. $J$ is square with $\det J=1\neq0$, so $J\Delta\theta=(0,-\tfrac{1}{10})^{\mathsf T}$ is solved exactly: row two gives $\Delta\theta_1$, then row one gives $\Delta\theta_2$.
$A=\begin{bmatrix}1&2\\1&0\\0&1\end{bmatrix}$ and $b=(2,2,3)^{\mathsf T}$, as in Problem 2. Solve the normal equations $A^{\mathsf T}A\hat x=A^{\mathsf T}b$ for $\hat x$.
$\hat x=(1,1)^{\mathsf T}$, the same as the QR route of Problem 2.
The entries are column dot products: $A^{\mathsf T}A=\begin{bmatrix}2&2\\2&5\end{bmatrix}$ and $A^{\mathsf T}b=(4,7)^{\mathsf T}$. Subtracting the first equation from the second leaves $3\hat x_2=3$, so $\hat x_2=1$, and then $2\hat x_1=4-2$ gives $\hat x_1=1$.
For least squares with $A=[\,a_1\ a_2\,]$, whose unit columns are $a_1=(1,0)^{\mathsf T}$ and $a_2=(\cos\varphi,\sin\varphi)^{\mathsf T}$: as $\varphi$ closes from $30^\circ$ to $2^\circ$, $\kappa_2(A)$ grows from $3.7$ to $57.3$. Which is correct?
Choice B. The QR route carries $\kappa_2(R)=\kappa_2(A)$; the normal equations carry $\kappa_2(A^{\mathsf T}A)=\kappa_2(A)^2$, which at $\varphi=2^\circ$ is about $3.3\times10^3$.
Conditioning is the problem's, stability the algorithm's. In exact arithmetic the normal equations are right; in floating point classical Gram–Schmidt can lose orthogonality.