Summary of some computational methods¶
Task 7.61 (Related exercises: Exercise 7.17, Exercise 7.24, Exercise 7.26, Exercise 7.1, Exercise 7.16)
Compute an orthonormal basis of a subspace \(U \subset {\bf R}^n\).
Method: First compute any (not necessarily orthonormal) basis of \(U\). Then orthonormalize that basis using the Gram–Schmidt algorithm (Proposition 7.32).
Task 7.62 (Related exercises: Exercise 7.2, Exercise 7.17, Exercise 7.4, Exercise 7.7, Exercise 7.3, Exercise 7.16)
Given \(x \in {\bf R}^n\) and a subspace \(U \subset {\bf R}^n\), compute the orthogonal projection \(p_U(x)\).
Method: Compute an orthonormal basis \(u_1, \dots, u_k\) of \(U\) (cf. Task 7.61), then use
One may also compute \(U^\bot\) (cf. Task 7.63), then compute \(p_{U^\bot}(x)\), and finally \(p_U(x) = x-p_{U^\bot}(x)\). This may be easier in practice, especially if \(\dim U > \dim U^\bot\).
Task 7.63 (Related exercises: Exercise 7.2, Exercise 7.17, Exercise 7.4, Exercise 7.24, Exercise 7.26, Exercise 7.5, Exercise 7.3, Exercise 7.16)
Compute the orthogonal complement \(U^\bot\) of a given a subspace \(U \subset {\bf R}^n\).
Method: Compute a basis \(u_1, \dots, u_k\) of \(U\). Then solve the homogeneous system
Equivalently, form the matrix
(whose rows are the basis vectors \(u_1\) etc.), and compute its kernel.
The next two tasks are related to the different representations of lines.
Task 7.64 (Related exercises: Exercise 7.14)
Convert a line \(L\) from cartesian equations (as in Definition 7.53) to a vector/parametric equation (as in Definition 7.50).
Method: Pick two distinct points \(p, q\) satisfying the cartesian equations. Then write
Choosing different points instead of \(p, q\) will give different vector equations; but if \(L = p' + L(p'-q')\), the two vectors \(p-q\) and \(p'-q'\) will necessarily be (non-zero) multiples of each other (by Lemma 7.41).
Task 7.65
Convert a line from vector equation form (Definition 7.50) \(L = v+L(w)\) into cartesian equations.
Method: Express one coordinate in terms of the free parameter and substitute into the other coordinate equations.
Task 7.66 (Related exercises: Exercise 7.19, Exercise 7.27)
Compute a cartesian equation for the plane \(P\) containing three non-collinear points \(p, q, r \in {\bf R}^3\).
Method: First write
Then compute a normal vector to \(L(q-p, r-p)\) and write the corresponding cartesian equation. As in Task 7.64, different choices of \(p, q, r\) may give different intermediate vectors, but they span the same underlying subspace.
Task 7.67 (Related exercises: Exercise 7.25, Exercise 7.14)
Given a line \(L\) and a point \(r \notin L\), find the plane \(P\) containing \(L\) and \(r\).
Method: Choose two distinct points \(p, q \in L\), then apply Task 7.66 to the three points \(p, q, r\).
Task 7.68 (Related exercises: Exercise 7.22, Exercise 7.25, Exercise 7.27)
Given a plane \(P = \{x \mid {\left \langle x, a \right \rangle} = d \}\), a line \(L = v + L(w) \subset P\), and a point \(p \in P\), find the line \(M \subset P\) through \(p\) orthogonal to \(L\).
Method: Write \(M = p + L(w')\). Determine \(w'\) by imposing \(w' \bot a\) and \(w' \bot w\), i.e., compute
as in Task 7.63.
Task 7.69 (Related exercises: Exercise 7.19, Exercise 7.14)
Given a plane in vector form \(P = v + L(w_1, w_2)\), compute a cartesian equation
Method: Compute \(W=L(w_1,w_2)\) and then \(W^\bot\). Choose any non-zero \(a \in W^\bot\), and set
Note: a presentation of \(P\) as above is not unique, but another presentation as \(P = \{x \in {\bf R}^3 | {\left \langle x, a' \right \rangle} = d'\}\) will be such that \(a = \lambda a'\) for some \(\lambda \in {\bf R}, \lambda \ne 0\), and \(d = \lambda d'\).
Task 7.70 (Related exercises: Exercise 7.25, Exercise 7.8)
Decide whether two lines are parallel.
Method: If the lines are in parametric form (\(L = v+L(w)\) and \(L' = v'+L(w')\)), check whether \(w\) and \(w'\) are linearly dependent. If the lines are given in cartesian form, first convert them via Task 7.64.
Task 7.71 (Related exercises: Exercise 7.18, Exercise 7.20, Exercise 7.23, Exercise 7.9)
Decide whether two lines \(L = v+L(w)\) and \(L' = v'+L(w')\) are skew.
Method: Verify both conditions: (a) \(w\) and \(w'\) are linearly independent, and (b) \(L \cap L' = \emptyset\). For condition (b), it is often convenient to use cartesian equations first (cf. Task 7.65).
Task 7.72 (Related exercises: Exercise 7.13, Exercise 7.18, Exercise 7.23, Exercise 7.27, Exercise 7.10)
Decide whether a line \(L = v+L(w)\) is parallel to a plane \(P\).
Method: If \(P = v' + L(w'_1,w'_2)\), check whether \(w\) is a linear combination of \(w'_1,w'_2\) (equivalently, \(W \subset W'\)). If \(P = \{x \mid {\left \langle x, a \right \rangle}=d\}\), check whether \({\left \langle w,a \right \rangle}=0\).
Task 7.73
Decide whether a line \(L = v+L(w)\) is orthogonal to a plane \(P\).
Method: If \(P = \{x \mid {\left \langle x, a \right \rangle}=d\}\), check whether \(w\) and \(a\) are linearly dependent. If \(P = v'+L(w'_1,w'_2)\), check whether \({\left \langle w,w'_1 \right \rangle}=0\) and \({\left \langle w,w'_2 \right \rangle}=0\).
Task 7.74 (Related exercises: Exercise 7.13, Exercise 7.23, Exercise 7.8, Exercise 7.9)
Compute the distance of two affine subspaces \(X = v + W\) and \(X' = v' + W'\) (including the point case \(W=\{0\}\)).
Method: Use one of the following equivalent approaches:
-
apply Theorem 7.59 via part 1.: compute \(Z = W+W'\), \(d := v-v'\), and compute the orthogonal projection \(m = p_{Z^\bot}(d)\), or equivalently \(m = d-p_Z(d)\) (cf. Task 7.62). Let \(x\) be a general point in \(X\), \(x'\) a general point in \(X'\), and solve the linear system \(x-x'=m\), – or –,
-
apply Theorem 7.59 via part 4.: again let \(x\) be a general point in \(X\), \(x'\) a general point in \(X'\), compute \(x-x'\) and solve the homogeneous linear system given by \({\left \langle x, w \right \rangle} = 0\) and \({\left \langle x, w' \right \rangle} = 0\), where \(w\) runs through a set of vectors spanning \(W\), and \(w'\) runs through a set of vectors spanning \(W'\).