Skip to content

Commit f464177

Browse files
committed
column notation
1 parent f6f176c commit f464177

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lectures/orth_proj.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ The proof is now complete.
388388
It is common in applications to start with $n \times k$ matrix $X$ with linearly independent columns and let
389389

390390
$$
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 \}
392392
$$
393393

394394
Then the columns of $X$ form a basis of $S$.
@@ -403,7 +403,7 @@ In this context, $P$ is often called the **projection matrix**
403403

404404
Suppose that $U$ is $n \times k$ with orthonormal columns.
405405

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$.
407407

408408
We know that the projection of $y$ onto $S$ is
409409

@@ -665,9 +665,9 @@ The following result uses the preceding algorithm to produce a useful decomposit
665665

666666
```{prf:proof} Let
667667
668-
* $x_j := \col_j (X)$
668+
* $x_j := \mathop{\mathrm{col}}_j (X)$
669669
* $\{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$
671671
672672
Since $x_j \in \mathop{\mathrm{span}}\{u_1, \ldots, u_j\}$, we have
673673
@@ -808,7 +808,7 @@ def gram_schmidt(X):
808808
U = np.empty((n, k))
809809
I = np.eye(n)
810810
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
812812
v1 = X[:,0]
813813
U[:, 0] = v1 / np.sqrt(np.sum(v1 * v1))
814814
@@ -817,7 +817,7 @@ def gram_schmidt(X):
817817
b = X[:, i] # The vector we're going to project
818818
Z = X[:, 0:i] # First i-1 columns of X
819819
820-
# Project onto the orthogonal complement of the col span of Z
820+
# Project onto the orthogonal complement of the columns span of Z
821821
M = I - Z @ np.linalg.inv(Z.T @ Z) @ Z.T
822822
u = M @ b
823823

0 commit comments

Comments
 (0)