arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

Gram-Schmidt Orthogonalization

hashtag
Overview

Gram-Schmidt orthogonalization is an algorithm that takes in a basis {bi}i=1n\left\{b_i\right\}_{i=1}^n{bi​}i=1n​ as an input and returns a basis {biβˆ—}i=1n\left\{b_i^*\right\}_{i=1}^n{biβˆ—β€‹}i=1n​where all vectors are orthogonal, i.e. at right angles. This new basis is defined as

biβˆ—=biβˆ’βˆ‘j=1iβˆ’1ΞΌi,jbjβˆ—ΞΌi,j=⟨bi,bjβˆ—βŸ©βŸ¨bjβˆ—,bjβˆ—βŸ©b_i^*=b_i-\sum_{j=1}^{i-1}\mu_{i,j}b_j^*\quad\mu_{i,j}=\frac{\langle b_i,b_j^*\rangle}{\langle b_j^*,b_j^*\rangle}biβˆ—β€‹=biβ€‹βˆ’j=1βˆ‘iβˆ’1​μi,j​bjβˆ—β€‹ΞΌi,j​=⟨bjβˆ—β€‹,bjβˆ—β€‹βŸ©βŸ¨bi​,bjβˆ—β€‹βŸ©β€‹

where ΞΌi,j\mu_{i,j}ΞΌi,j​is the Gram-Schmidt coefficients.

One can immediately check that this new basis is orthogonal, meaning

Let be the matrix where the th row is given by andbe the matrix where the th row is given by , then the Gram-Schmidt orthogonalization gives us where and is the Gram-Schmidt coefficient. As an example, consider the basis of a subspace of :

Instead of doing the Gram-Schmidt orthogonalization by hand, we can get sage to do it for us:

This outputs two matrices, and :

One can quickly verify that and that the rows of are orthogonal to each other.

A useful result is that

Intuitively, this tells us that the more orthogonal a set of basis for a lattice is, the shorter it is as the volume must be constant.

hashtag
Exercises

1) Show that the basis is orthogonal.

2) Verify that the output of sage is indeed correct.

3) Show that and is a diagonal matrix whose entries are . Conclude that .

4*) Given the Iwasawa decomposition where is a lower diagonal matrix with on its diagonal, is a diagonal matrix and an orthogonal matrix, meaning , show that and . Furthermore, prove that such a decomposition is unique.

⟨biβˆ—,bjβˆ—βŸ©={0iβ‰ jβˆ₯biβˆ—βˆ₯2i=j\langle b_i^*,b_j^*\rangle=\begin{cases}0&i\neq j\\\left\lVert b_i^*\right\rVert^2&i=j\end{cases}⟨biβˆ—β€‹,bjβˆ—β€‹βŸ©={0βˆ₯biβˆ—β€‹βˆ₯2​iξ€ =ji=j​
B\mathcal BB
iii
bib_ibi​
Bβˆ—\mathcal B^*Bβˆ—
iii
biβˆ—b_i^*biβˆ—β€‹
B=ΞΌBβˆ—\mathcal B=\mu\mathcal B^*B=ΞΌBβˆ—
ΞΌi,i=1,ΞΌj,i=0\mu_{i,i}=1,\mu_{j,i}=0ΞΌi,i​=1,ΞΌj,i​=0
ΞΌi,j\mu_{i,j}ΞΌi,j​
R4\mathbb R^4R4
b1=(βˆ’1βˆ’231)b2=(βˆ’6βˆ’451)b3=(551βˆ’3)\begin{matrix} b_1 &= & (&-1&-2&3&1&)\\ b_2 &= & (&-6&-4&5&1&)\\ b_3 &= & (&5&5&1&-3&) \end{matrix}b1​b2​b3​​===​(((β€‹βˆ’1βˆ’65β€‹βˆ’2βˆ’45​351​11βˆ’3​)))​
Bβˆ—\mathcal B^*Bβˆ—
ΞΌ\muΞΌ
B=ΞΌBβˆ—\mathcal B=\mu\mathcal B^*B=ΞΌBβˆ—
Bβˆ—\mathcal B^*Bβˆ—
det⁑(BBT)=det⁑(Bβˆ—Bβˆ—T)=∏iβˆ₯biβˆ—βˆ₯\det\left(\mathcal B\mathcal B^T\right)=\det\left(\mathcal B^*\mathcal B^{*T}\right)=\prod_i\left\lVert b_i^*\right\rVertdet(BBT)=det(Bβˆ—Bβˆ—T)=iβˆβ€‹βˆ₯biβˆ—β€‹βˆ₯
biβˆ—b_i^*biβˆ—β€‹
ΞΌΞΌT=1\mu\mu^T=1ΞΌΞΌT=1
Bβˆ—Bβˆ—T\mathcal B^*\mathcal B^{*T}Bβˆ—Bβˆ—T
βˆ₯biβˆ—βˆ₯\left\lVert b_i^*\right\rVertβˆ₯biβˆ—β€‹βˆ₯
det⁑(BBT)=det⁑(Bβˆ—Bβˆ—T)=∏iβˆ₯biβˆ—βˆ₯\det\left(\mathcal B\mathcal B^T\right)=\det\left(\mathcal B^*\mathcal B^{*T}\right)=\prod_i\left\lVert b_i^*\right\rVertdet(BBT)=det(Bβˆ—Bβˆ—T)=∏i​βˆ₯biβˆ—β€‹βˆ₯
B=LDO\mathcal B=LDOB=LDO
LLL
111
DDD
OOO
OOT=1OO^T=1OOT=1
Bβˆ—=DO\mathcal B^*=DOBβˆ—=DO
ΞΌ=L\mu=LΞΌ=L
B = Matrix([
[-1, -2, 3, 1],
[-6, -4, 5, 1],
[5, 5, 1, -3]])

B.gram_schmidt()
(
[-1 -2  3  1]  [ 1  0  0]
[-4  0 -1 -1]  [ 2  1  0]
[ 0  3  3 -3], [-1 -1  1]
)