MATH 414 Lecture 5

From Notes
Jump to navigation Jump to search

« previous | Friday, January 24, 2014 | next »


Hyperbolic Trigonometric Functions

sinh⁡x=ex−e−x2=isin⁡(−ix)


Gram-Schmidt Process

INPUT: basis vectors U={v→1,v→2,…,v→n} for a vector space V=Span{v→1,v→2,…,v→n}.

OUTPUT: orthonormal basis O={e^1,e^2,…,e^n} for V

e^1:=v→1‖v→1‖
O:={e^1}
for i from 2 to n
p→i:=∑k=1i−1⟨v→i,e^k⟩e^k
e^i:=v→i−p→i‖v→i−p→i‖
O:=O∪{e^i}

Python Implementation

def gram_schmidt(basis):
    on_basis = [ normalize(basis[0]) ]
    for i in xrange(1, len(basis)):
        p = sum(inner_product(basis[i], e) * e for e in on_basis)
        next_e = normalize(basis[i] - p)
        on_basis.append(next_e)
    return on_basis


Trick

Calculating ‖v→i−p→i‖=⟨v→i−p→i,v→i−p→i⟩; in L2[a,b] space, ∫ab(vi(x)−pi(x))2dx; can be a long and cumbersome process, but we can compute this length using values we already know:

Theorem. ‖v→i−p→i‖=‖v→‖2−∑k=1n−1⟨v→i,e^k⟩2

Proof. Observe that p→i and v→i−p→i are orthogonal by construction, so v→i, p→i, and v→i−p→i form a right triangle.

Therefore ‖p→i‖2+‖v→i−p→i‖2=‖v→i‖2, in particular, ‖v→i−p→i‖2=‖v→i‖2−‖p→i‖2, by the Pythagorean theorem.

By definition, p→i=∑k=1n−1⟨v→i,e^k⟩e^k. By generalizing the pythagorean theorem into multiple dimensions, we have ‖p→i‖2=‖∑k=1n−1⟨v→i,e^k⟩e^k‖2=∑k=1n−1‖⟨v→i,e^k⟩e^k‖2 because all ⟨v→i,e^k⟩e^k are orthogonal.

Factoring out the scalar value ⟨v→i,e^k⟩ from the length of each component in the sum leaves just ⟨v→i,e^k⟩2‖e^k‖2, and of course the length of e^k is 1. Therefore,

‖p→i‖2=∑k=1n−1⟨v→i,e^k⟩2

Plugging this definition into the pythagorean identity above yields the desired equation for ‖v→i−p→i‖.

quod erat demonstrandum