MATH 414 Lecture 5

From Notes
Jump to navigation Jump to search

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


Hyperbolic Trigonometric Functions

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \sinh{x} = \frac{\mathrm{e}^{x} - \mathrm{e}^{-x}}{2} = i \, \sin{\left( -i \, x \right)}}


Gram-Schmidt Process

INPUT: basis vectors Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle U = \left\{ \vec{v}_1, \vec{v}_2, \ldots, \vec{v}_n \right\}} for a vector space Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle V = \mathrm{Span}\left\{ \vec{v}_1, \vec{v}_2, \ldots, \vec{v}_n \right\}} .

OUTPUT: orthonormal basis Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle O = \left\{ \hat{e}_1, \hat{e}_2, \ldots, \hat{e}_n \right\}} for Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle V}

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \hat{e}_1 := \frac{\vec{v}_1}{\left\| \vec{v}_1 \right\|}}
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle O := \left\{ \hat{e}_1 \right\}}
for Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle i} from Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle 2} to Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle n}
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \vec{p}_i := \displaystyle\sum_{k=1}^{i-1} \left\langle \vec{v}_i, \hat{e}_k \right\rangle \, \hat{e}_k}
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \hat{e}_i := \displaystyle\frac{\vec{v}_i - \vec{p}_i}{\left\| \vec{v}_i - \vec{p}_i \right\|}}
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle O := O \cup \left\{ \hat{e}_i \right\}}

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 Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \left\| \vec{v}_i - \vec{p}_i \right\| = \left\langle \vec{v}_i - \vec{p}_i, \vec{v}_i - \vec{p}_i \right\rangle} ; in Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle L^2\left[ a,b \right]} space, Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \int_a^b \left( v_i\left(x\right) - p_i\left(x\right) \right)^2 \, \mathrm{d}x} ; can be a long and cumbersome process, but we can compute this length using values we already know:

Theorem. Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \left\| \vec{v}_i - \vec{p}_i \right\| = \sqrt{\left\| \vec{v} \right\|^2 - \sum_{k=1}^{n-1} \left\langle \vec{v}_i, \hat{e}_k \right\rangle^2}}

Proof. Observe that Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \vec{p}_i} and Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \vec{v}_i - \vec{p}_i} are orthogonal by construction, so Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \vec{v}_i} , Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \vec{p}_i} , and Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \vec{v}_i - \vec{p}_i} form a right triangle.

Therefore Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \left\| \vec{p}_i \right\|^2 + \left\| \vec{v}_i - \vec{p}_i \right\|^2 = \left\| \vec{v}_i \right\|^2} , in particular, Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \left\| \vec{v}_i - \vec{p}_i \right\|^2 = \left\| \vec{v}_i \right\|^2 - \left\| \vec{p}_i \right\|^2} , by the Pythagorean theorem.

By definition, Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \vec{p}_i = \sum_{k=1}^{n-1} \left\langle \vec{v}_i, \hat{e}_k \right\rangle \, \hat{e}_k} . By generalizing the pythagorean theorem into multiple dimensions, we have Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \left\| \vec{p}_i \right\|^2 = \left\| \sum_{k=1}^{n-1} \left\langle \vec{v}_i, \hat{e}_k \right\rangle \, \hat{e}_k \right\|^2 = \sum_{k=1}^{n-1} \left\| \left\langle \vec{v}_i, \hat{e}_k \right\rangle \, \hat{e}_k \right\|^2} because all Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \left\langle \vec{v}_i, \hat{e}_k \right\rangle \, \hat{e}_k} are orthogonal.

Factoring out the scalar value Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \left\langle \vec{v}_i, \hat{e}_k \right\rangle} from the length of each component in the sum leaves just Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \left\langle \vec{v}_i, \hat{e}_k \right\rangle^2 \, \left\| \hat{e}_k \right\|^2} , and of course the length of Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \hat{e}_k} is Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle 1} . Therefore,

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \left\| \vec{p}_i \right\|^2 = \sum_{k=1}^{n-1} \left\langle \vec{v}_i, \hat{e}_k \right\rangle^2}

Plugging this definition into the pythagorean identity above yields the desired equation for Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \left\| \vec{v}_i - \vec{p}_i \right\|} .

quod erat demonstrandum