Mathematics II · Unit 8 · 5 hrs
Orthogonality and Least Squares
Exam-focused notes for Orthogonality and Least Squares (Mathematics II, MTH168): what the TU syllabus asks and how it has actually been tested, with 14 solved past questions from this unit.
What this unit covers
- Inner product, Length, and orthoganility
- Orthogonal sets
- Orthogonal projections
- The Gram-Schmidt process
- Least squares problems
- Application to linear models
- Inner product spaces
- Applications of inner product spaces
Least squares problems
Find the least square solution of $Ax = c$ where
$$A = \begin{bmatrix} 1 & -3 & 3 \ 1 & 5 & 1 \ 1 & 7 & 2 \end{bmatrix}, \quad c = \begin{bmatrix} 5 \ -3 \ 5 \end{bmatrix}$$
and compute the associated least square error. [10+0]
$$A = \begin{bmatrix} 1 & -3 & 3 \\ 1 & 5 & 1 \\ 1 & 7 & 2 \end{bmatrix}, \quad c = \begin{bmatrix} 5 \\ -3 \\ 5 \end{bmatrix}$$ We solve the normal equations $A^TA\hat{x} = A^Tc$. --- $$A^T = \begin{bmatrix} 1 & 1 & 1 \\ -3 & 5 & 7 \\ 3 & 1 & 2 \end{bmatri...
Full solved answer →Find the equation $y = a_0 + a_1 x$ of the least squares line that best fits the data points (2,1), (5,2), (7,3), (8,3). [5]
Points: $(2,1), (5,2), (7,3), (8,3)$, with $n = 4$. $$\sum y = na0 + a1\sum x$$ $$\sum xy = a0\sum x + a1\sum x^2$$ $x$ $y$ $x^2$ $xy$ -------------- 2 1 4 2 5 2 25 10 7 3 49 21 8 3 64 24 $\sum x=22$ $\sum y=9$ $\sum x^2=142$ $\sum xy=57$ $$9 = 4a0 + 22a1 \...
Full solved answer →Find the equation $y = a_0 + a_1 x$ of the least square line that best fits the data points (0, 1), (1, 1), (1, 1), (2, 2), (3, 2).[10]
Data points to fit with $y = a0 + a1 x$: $x$ $y$ ---------- 0 1 1 1 1 1 2 2 3 2 Number of data points: $n = 5$ (the point $(1,1)$ appears twice; both are used). $x$ $y$ $x^2$ $xy$ ----------------------- 0 1 0 0 1 1 1 1 1 1 1 1 2 2 4 4 3 2 9 6 $$\sum x = 7,...
Full solved answer →Find a least square solution of the inconsistent system $Ax=b$ for
$$A = \begin{bmatrix} -1 & 2 \ 2 & -3 \ -1 & 3 \end{bmatrix}, \quad b = \begin{bmatrix} 4 \ 2 \ 1 \end{bmatrix}$$
[10]
$$A = \begin{bmatrix} -1 & 2 \\ 2 & -3 \\ -1 & 3 \end{bmatrix}, \qquad b = \begin{bmatrix} 4 \\ 2 \\ 1 \end{bmatrix}$$ Unknown: $\hat{x} = \begin{bmatrix} x1 \\ x2 \end{bmatrix}$ The least square solution satisfies the normal equations: $$A^T A \,\hat{x} = ...
Full solved answer →Find the least-square solution of $Ax = b$ for
$$A = \begin{bmatrix} 1 & -6 \ 1 & -2 \ 1 & 1 \ 1 & 7 \end{bmatrix} \text{ and } b = \begin{bmatrix} -1 \ 2 \ 1 \ 6 \end{bmatrix}$$
[10]
$$A = \begin{bmatrix} 1 & -6 \\ 1 & -2 \\ 1 & 1 \\ 1 & 7 \end{bmatrix}, \quad b = \begin{bmatrix} -1 \\ 2 \\ 1 \\ 6 \end{bmatrix}$$ The least-square solution solves the normal equations: $$A^T A \hat{x} = A^T b$$ --- $$A^T = \begin{bmatrix} 1 & 1 & 1 & 1 \\...
Full solved answer →Find the least-square solution of $Ax = b$ for
$$A = \begin{bmatrix} 1 & 3 & 5 \ 1 & 1 & 0 \ 1 & 1 & 2 \ 1 & 3 & 3 \end{bmatrix}, \quad b = \begin{pmatrix} 3 \ 5 \ 7 \ 3 \end{pmatrix}$$
[10]
$$A = \begin{bmatrix} 1 & 3 & 5 \\ 1 & 1 & 0 \\ 1 & 1 & 2 \\ 1 & 3 & 3 \end{bmatrix}, \qquad b = \begin{pmatrix} 3 \\ 5 \\ 7 \\ 3 \end{pmatrix}$$ The least-square solution $\hat{x}$ solves the normal equations: $$A^T A \hat{x} = A^T b$$ $$A^T = \begin{bmatr...
Full solved answer →Find the least square solution of $Ax = b$ where and compute the associated least square error.
$$A = \begin{bmatrix} 1 & -3 & -3 \ 1 & 5 & 1 \ 1 & 7 & 2 \end{bmatrix}, \quad b = \begin{bmatrix} 5 \ -3 \ -5 \end{bmatrix}$$
[10]
$$A = \begin{bmatrix} 1 & -3 & -3 \\ 1 & 5 & 1 \\ 1 & 7 & 2 \end{bmatrix}, \quad b = \begin{bmatrix} 5 \\ -3 \\ -5 \end{bmatrix}$$ The least square solution solves the normal equation $A^TA\hat{x} = A^Tb$. --- $$A^T = \begin{bmatrix} 1 & 1 & 1 \\ -3 & 5 & 7...
Full solved answer →Inner product, Length, and orthoganility
Prove that the two vectors u and v are perpendicular to each other if and only if the line through u is perpendicular bisector of the line segment from -u to v. [5]
The line through u means the line passing through the origin in the direction of u, i.e., the set {tu : t ∈ ℝ}. The line segment from -v to v has its midpoint at the origin (since (-v + v)/2 = 0). The line through u is the perpendicular bisector of the segm...
Full solved answer →Define unit vector. Find a unit vector of u = (0, -2, 2, -3) in the direction of u. [5]
- Vector $\mathbf{u} = (0, -2, 2, -3)$ in $\mathbb{R}^4$ - Task: Define unit vector; find unit vector in the direction of $\mathbf{u}$. All data present. A unit vector is a vector whose length (norm) is equal to $1$. For any nonzero vector $\mathbf{v} \in \...
Full solved answer →Find a unit vector $v$ of $u = (1, -2, 2, 3)$ in the direction of $u$. [5]
$$u = (1,\ -2,\ 2,\ 3)$$ The unit vector in the direction of $u$ is: $$\hat{u} = \frac{u}{\u\}, \qquad \u\ = \sqrt{u1^2 + u2^2 + u3^2 + u4^2}$$ $$\u\ = \sqrt{(1)^2 + (-2)^2 + (2)^2 + (3)^2} = \sqrt{1 + 4 + 4 + 9} = \sqrt{18} = 3\sqrt{2}$$ $$\hat{u} = \frac{...
Full solved answer →Prove that the two vectors uuu and vvv are perpendicular to each other if and only if the line through uuu is perpendicular bisector of the line segment from −u-u−u to vvv. [5]
The line segment runs from -u to v. Its midpoint is: $$M = \frac{-\mathbf{u} + \mathbf{v}}{2}$$ The line through u (passing through the origin in the direction of u) is the perpendicular bisector of the segment from -u to v if and only if two conditions hol...
Full solved answer →State and prove the Pythagorean theorem of two vectors and verify this for u = (1, -1) and v = (1, 1). [5]
- Vectors: $\mathbf{u} = (1, -1)$ and $\mathbf{v} = (1, 1)$ - Required: State and prove the Pythagorean theorem for vectors, then verify. --- If $\mathbf{u}$ and $\mathbf{v}$ are two vectors in an inner product space, then $\mathbf{u}$ and $\mathbf{v}$ are ...
Full solved answer →Let u = (1, -2, 2, 0). Find a unit vector of v in the same direction of u. [5]
- Vector: $u = (1, -2, 2, 0)$ $$\u\ = \sqrt{u1^2 + u2^2 + u3^2 + u4^2}$$ $$\u\ = \sqrt{(1)^2 + (-2)^2 + (2)^2 + (0)^2} = \sqrt{1 + 4 + 4 + 0} = \sqrt{9} = 3$$ The unit vector in the same direction as $u$ is: $$v = \frac{u}{\u\} = \frac{1}{3}(1, -2, 2, 0)$$ ...
Full solved answer →The Gram-Schmidt process
Find the QR factorization of the matrix $\begin{bmatrix} 2 & 1 \ 3 & -1 \end{bmatrix}$ [5]
$$A = \begin{bmatrix} 2 & 1 \\ 3 & -1 \end{bmatrix}$$ Columns: $$\mathbf{a1} = \begin{bmatrix} 2 \\ 3 \end{bmatrix}, \qquad \mathbf{a2} = \begin{bmatrix} 1 \\ -1 \end{bmatrix}$$ Goal: find orthogonal $Q$ and upper-triangular $R$ with $A = QR$. $$\mathbf{u1}...
Full solved answer →Make Unit 8 stick
Practice MTH168 with flashcards & quizzes