summaryrefslogtreecommitdiff
path: root/latex/know/concept/gram-schmidt-method
diff options
context:
space:
mode:
authorPrefetch2021-02-21 20:53:46 +0100
committerPrefetch2021-02-21 20:53:46 +0100
commit15bfb7730801809704c6561e20c5ca47627b2d79 (patch)
tree0f911134a4b040cb43b1acbecfb43931bd5c0837 /latex/know/concept/gram-schmidt-method
parentd33ac5f01a6599406d516edfd45b9938795cea6d (diff)
Add "Gram-Schmidt method"
Diffstat (limited to 'latex/know/concept/gram-schmidt-method')
-rw-r--r--latex/know/concept/gram-schmidt-method/source.md35
1 files changed, 35 insertions, 0 deletions
diff --git a/latex/know/concept/gram-schmidt-method/source.md b/latex/know/concept/gram-schmidt-method/source.md
new file mode 100644
index 0000000..b0c7b3b
--- /dev/null
+++ b/latex/know/concept/gram-schmidt-method/source.md
@@ -0,0 +1,35 @@
+% Gram-Schmidt method
+
+
+# Gram-Schmidt method
+
+Given a set of linearly independent non-orthonormal vectors
+$\ket*{V_1}, \ket*{V_2}, ...$ from a Hilbert space, the **Gram-Schmidt method**
+turns them into an orthonormal set $\ket*{n_1}, \ket*{n_2}, ...$ as follows:
+
+1. Take the first vector $\ket*{V_1}$ and normalize it to get $\ket*{n_1}$:
+
+ $$\begin{aligned}
+ \ket*{n_1} = \frac{\ket*{V_1}}{\sqrt{\braket*{V_1}{V_1}}}
+ \end{aligned}$$
+
+2. Begin loop. Take the next non-orthonormal vector $\ket*{V_j}$, and
+ subtract from it its projection onto every already-processed vector:
+
+ $$\begin{aligned}
+ \ket*{n_j'} = \ket*{V_j} - \ket*{n_1} \braket*{n_1}{V_j} - \ket*{n_2} \braket*{n_2}{V_j} - ... - \ket*{n_{j-1}} \braket*{n_{j-1}}{V_{j-1}}
+ \end{aligned}$$
+
+ This leaves only the part of $\ket*{V_j}$ which is orthogonal to
+ $\ket*{n_1}$, $\ket*{n_2}$, etc. This why the input vectors must be
+ linearly independent; otherwise $\ket{n_j'}$ may become zero at some
+ point.
+
+3. Normalize the resulting ortho*gonal* vector $\ket*{n_j'}$ to make it
+ ortho*normal*:
+
+ $$\begin{aligned}
+ \ket*{n_j} = \frac{\ket*{n_j'}}{\sqrt{\braket*{n_j'}{n_j'}}}
+ \end{aligned}$$
+
+4. Loop back to step 2, taking the next vector $\ket*{V_{j+1}}$.