@@ -388,7 +388,7 @@ The proof is now complete.
388
388
It is common in applications to start with $n \times k$ matrix $X$ with linearly independent columns and let
389
389
390
390
$$
391
- S := \mathop{\mathrm{span}} X := \mathop{\mathrm{span}} \{\col_1 X, \ldots, \col_k X \}
391
+ S := \mathop{\mathrm{span}} X := \mathop{\mathrm{span}} \{\mathop{\mathrm{col}}_i X, \ldots, \mathop{\mathrm{col}}_k X \}
392
392
$$
393
393
394
394
Then the columns of $X$ form a basis of $S$.
@@ -403,7 +403,7 @@ In this context, $P$ is often called the **projection matrix**
403
403
404
404
Suppose that $U$ is $n \times k$ with orthonormal columns.
405
405
406
- Let $u_i := \mathop{\mathrm{col}} U_i $ for each $i$, let $S := \mathop{\mathrm{span}} U$ and let $y \in \mathbb R^n$.
406
+ Let $u_i := \mathop{\mathrm{col}}_ i U $ for each $i$, let $S := \mathop{\mathrm{span}} U$ and let $y \in \mathbb R^n$.
407
407
408
408
We know that the projection of $y$ onto $S$ is
409
409
@@ -665,9 +665,9 @@ The following result uses the preceding algorithm to produce a useful decomposit
665
665
666
666
``` {prf:proof} Let
667
667
668
- * $x_j := \col_j (X)$
668
+ * $x_j := \mathop{\mathrm{col}}_j (X)$
669
669
* $\{u_1, \ldots, u_k\}$ be orthonormal with the same span as $\{x_1, \ldots, x_k\}$ (to be constructed using Gram--Schmidt)
670
- * $Q$ be formed from cols $u_i$
670
+ * $Q$ be formed from columns $u_i$
671
671
672
672
Since $x_j \in \mathop{\mathrm{span}}\{u_1, \ldots, u_j\}$, we have
673
673
@@ -808,7 +808,7 @@ def gram_schmidt(X):
808
808
U = np.empty((n, k))
809
809
I = np.eye(n)
810
810
811
- # The first col of U is just the normalized first col of X
811
+ # The first columns of U is just the normalized first columns of X
812
812
v1 = X[:,0]
813
813
U[:, 0] = v1 / np.sqrt(np.sum(v1 * v1))
814
814
@@ -817,7 +817,7 @@ def gram_schmidt(X):
817
817
b = X[:, i] # The vector we're going to project
818
818
Z = X[:, 0:i] # First i-1 columns of X
819
819
820
- # Project onto the orthogonal complement of the col span of Z
820
+ # Project onto the orthogonal complement of the columns span of Z
821
821
M = I - Z @ np.linalg.inv(Z.T @ Z) @ Z.T
822
822
u = M @ b
823
823
0 commit comments