Proceso de ortogonalización de Gram-Schmidt

Animación que describe el proceso de ortonormalización en el espacio tridimensional

El proceso se basa en un resultado de la geometría euclídea, el cual establece que la diferencia entre un vector v {\displaystyle \mathbf {v} } y su proyección sobre otro vector u {\displaystyle \mathbf {u} } , es perpendicular al vector u {\displaystyle \mathbf {u} } .[1]​ Dicho resultado constituye una herramienta para construir, a partir de un conjunto de dos vectores no paralelos, otro conjunto, conformado por dos vectores perpendiculares.

Este algoritmo recibe su nombre de los matemáticos Jørgen Pedersen Gram y Erhard Schmidt.

Interpretación geométrica

En el espacio euclídeo R 3 {\displaystyle \mathbb {R} ^{3}} con el producto escalar usual definido, se propone un método para encontrar un sistema de vectores, perpendiculares entre sí, a partir de tres vectores no coplanarios cualesquiera. Sean v 1 , v 2 , v 3 R 3 {\displaystyle \mathbf {v} _{1},\mathbf {v} _{2},\mathbf {v} _{3}\in \mathbb {R} ^{3}} dichos vectores.

El método consiste de dos proyecciones. La base ortogonal de R 3 {\displaystyle \mathbb {R} ^{3}} compuesta por u 1 , u 2 , u 3 {\displaystyle \mathbf {u} _{1},\mathbf {u} _{2},\mathbf {u} _{3}} , se calcula de la siguiente manera.

  1. Se escoge arbitrariamente uno de los vectores dados, por ejemplo, u 1 = v 1 {\displaystyle \mathbf {u} _{1}=\mathbf {v} _{1}} .
  2. u 2 {\displaystyle \mathbf {u} _{2}} se calcula como la diferencia entre v 2 {\displaystyle \mathbf {v} _{2}} y el vector que resulta de proyectar a v 2 {\displaystyle \mathbf {v} _{2}} sobre u 1 {\displaystyle \mathbf {u} _{1}} . Dicha diferencia es perpendicular a u 1 {\displaystyle \mathbf {u} _{1}} . Es equivalente afirmar que u 2 {\displaystyle \mathbf {u} _{2}} es la diferencia entre v 2 {\displaystyle \mathbf {v} _{2}} y el vector que resulta de proyectar a v 2 {\displaystyle \mathbf {v} _{2}} sobre la recta que genera u 1 {\displaystyle \mathbf {u} _{1}} .
  3. u 3 {\displaystyle \mathbf {u} _{3}} es la diferencia entre v 3 {\displaystyle \mathbf {v} _{3}} y el vector que resulta de proyectar a v 3 {\displaystyle \mathbf {v} _{3}} sobre el plano generado por u 1 {\displaystyle \mathbf {u} _{1}} y u 2 {\displaystyle \mathbf {u} _{2}} . La diferencia de vectores tiene como resultado otro vector que es perpendicular al plano.

Esta sencilla interpretación del algoritmo para un caso que puede verse es susceptible de generalización a espacios vectoriales de dimensión arbitraria, con productos internos definidos, no necesariamente canónicos. Dicha generalización no es otra que el proceso de Gram-Schmidt.

Descripción del algoritmo de ortogonalización de Gram–Schmidt

Los dos primeros pasos del proceso de Gram–Schmidt
Los dos primeros pasos del proceso de Gram–Schmidt

El método de Gram-Schmidt se usa para hallar bases ortogonales (Espacio Euclideo no normalizado) de cualquier base no euclídea.

En primer lugar tenemos que:

v v , u u , u u = v p r o y u ( v ) {\displaystyle \mathbf {v} -{\langle \mathbf {v} ,\mathbf {u} \rangle \over \langle \mathbf {u} ,\mathbf {u} \rangle }\mathbf {u} =\mathbf {v} -\mathrm {proy} _{\mathbf {u} }\,(\mathbf {v} )}

Es un vector ortogonal a u {\displaystyle \mathbf {u} } . Entonces, dados los vectores v 1 , , v n {\displaystyle \mathbf {v} _{1},\dots ,\mathbf {v} _{n}} , se define:

u 1 = v 1 , {\displaystyle \mathbf {u} _{1}=\mathbf {v} _{1},}
u 2 = v 2 v 2 , u 1 u 1 , u 1 u 1 , {\displaystyle \mathbf {u} _{2}=\mathbf {v} _{2}-{\langle \mathbf {v} _{2},\mathbf {u} _{1}\rangle \over \langle \mathbf {u} _{1},\mathbf {u} _{1}\rangle }\mathbf {u} _{1},}
u 3 = v 3 v 3 , u 1 u 1 , u 1 u 1 v 3 , u 2 u 2 , u 2 u 2 , {\displaystyle \mathbf {u} _{3}=\mathbf {v} _{3}-{\langle \mathbf {v} _{3},\mathbf {u} _{1}\rangle \over \langle \mathbf {u} _{1},\mathbf {u} _{1}\rangle }\mathbf {u} _{1}-{\langle \mathbf {v} _{3},\mathbf {u} _{2}\rangle \over \langle \mathbf {u} _{2},\mathbf {u} _{2}\rangle }\mathbf {u} _{2},}

Generalizando en k:

u k = v k j = 1 k 1 v k , u j u j , u j u j {\displaystyle \mathbf {u} _{k}=\mathbf {v} _{k}-\sum _{j=1}^{k-1}{\langle \mathbf {v} _{k},\mathbf {u} _{j}\rangle \over \langle \mathbf {u} _{j},\mathbf {u} _{j}\rangle }\mathbf {u} _{j}}

A partir de las propiedades del producto escalar, es sencillo probar que el conjunto de vectores u 1 , , u n {\displaystyle \mathbf {u} _{1},\dots ,\mathbf {u} _{n}} es ortogonal.

Proposición 1

Si

B = { v 1 , v 2 , , v k } {\displaystyle {\mathcal {B}}=\left\{\mathbf {v} _{1},\mathbf {v} _{2},\dots ,\mathbf {v} _{k}\right\}}

es un conjunto de vectores linealmente independientes, los vectores u1u2, ... uk definidos por

{ u 1 = v 1 u k = v k j = 1 k 1 proy u j ( v k ) para   k > 1 {\displaystyle \left\{{\begin{array}{rcll}\mathbf {u} _{1}&=&\mathbf {v} _{1}&\\\mathbf {u} _{k}&=&\mathbf {v} _{k}-\displaystyle \sum _{j=1}^{k-1}\operatorname {proy} _{\mathbf {u} _{j}}\left(\mathbf {v} _{k}\right)&{\textrm {para}}\ k>1\end{array}}\right.}

son todos no nulos. Dicho de otra manera, para cada k,

u k , u k 0. {\displaystyle \left\langle u_{k},u_{k}\right\rangle \neq 0.}


Demostración
Procedemos por inducción. Supongamos que fuese
u 1 = 0 {\displaystyle \mathbf {u} _{1}=\mathbf {0} }

esto implica por definición de u1 que

v 1 = 0 {\displaystyle \mathbf {v} _{1}=\mathbf {0} }

lo cual contradice la hipótesis de que B {\displaystyle {\mathcal {B}}} es linealmente independiente. Luego,

u 1 0 . {\displaystyle \mathbf {u} _{1}\neq \mathbf {0} .}

Establezcamos la hipótesis inductiva como sigue.

j < k ,   u j 0 {\displaystyle \forall j<k,\ \mathbf {u} _{j}\neq \mathbf {0} }

Expresamos v1v2, ... vk en función de los u1u2, ... uk de la siguiente manera.

[ 1 0 0 u 1 , v 2 u 1 , u 1 1 0 u 1 , v k u 1 , u 1 u 2 , v k u 2 , u 2 1 ] [ u 1 u 2 u k ] = [ v 1 v 2 v k ] {\displaystyle {\begin{bmatrix}1&0&\cdots &0\\{\frac {\left\langle \mathbf {u} _{1},\mathbf {v} _{2}\right\rangle }{\left\langle \mathbf {u} _{1},\mathbf {u} _{1}\right\rangle }}&1&\cdots &0\\\vdots &\vdots &\ddots &\vdots \\{\frac {\left\langle \mathbf {u} _{1},\mathbf {v} _{k}\right\rangle }{\left\langle \mathbf {u} _{1},\mathbf {u} _{1}\right\rangle }}&{\frac {\left\langle \mathbf {u} _{2},\mathbf {v} _{k}\right\rangle }{\left\langle \mathbf {u} _{2},\mathbf {u} _{2}\right\rangle }}&\cdots &1\end{bmatrix}}{\begin{bmatrix}\mathbf {u} _{1}&\mathbf {u} _{2}&\cdots &\mathbf {u} _{k}\end{bmatrix}}={\begin{bmatrix}\mathbf {v} _{1}&\mathbf {v} _{2}&\cdots &\mathbf {v} _{k}\end{bmatrix}}}

En la expresión, se ve que es posible despejar uk en función de una sucesión vj de vectores, puesto que la matriz del conjunto de sistemas es triangular inferior, con todos sus elementos en la diagonal distintos de cero. Esto implica en particular que existen escalares

μ ( 2 ) ( 1 ) , , μ ( k ) ( 1 ) , μ ( k ) ( 2 ) , μ ( k ) ( k 1 ) {\displaystyle \mu _{(2)(1)},\dots ,\mu _{(k)(1)},\dots \mu _{(k)(2)},\dots \mu _{(k)(k-1)}}

(tantos como elementos en el triángulo inferior de la matriz inversa) tales que

u k = v k + j = 1 k 1 μ ( k ) ( j ) v j . {\displaystyle \mathbf {u} _{k}=\mathbf {v} _{k}+\sum _{j=1}^{k-1}\mu _{(k)(j)}\mathbf {v} _{j}.}

Supongamos que fuera uk = 0, en este caso queda

0 = v k + j = 1 k 1 μ ( k ) ( j ) v j {\displaystyle 0=\mathbf {v} _{k}+\sum _{j=1}^{k-1}\mu _{(k)(j)}\mathbf {v} _{j}}

y por lo tanto existen escalares, no todos nulos, que producen una combinación nula con vectores de B {\displaystyle {\mathcal {B}}} . Esto contradice la hipótesis de que B {\displaystyle {\mathcal {B}}} es linealmente independiente. Luego,

u k 0 {\displaystyle \mathbf {u} _{k}\neq \mathbf {0} }

igualdad que, por el principio de inducción, es válida para todo k natural∎

Proposición 2

El conjunto

E = { u 1 , u 2 , , u k } {\displaystyle {\mathcal {E}}=\left\{\mathbf {u} _{1},\mathbf {u} _{2},\dots ,\mathbf {u} _{k}\right\}}

está constituido por vectores mutuamente ortogonales.


Demostración
Sea
P = { ( n , k ) N × N : n < k , u n , u k = 0 u n , u n 0 } {\displaystyle P=\left\{(n,k)\in \mathbb {N} \times \mathbb {N} :\forall n<k,\,\left\langle \mathbf {u} _{n},\mathbf {u} _{k}\right\rangle =0\land \left\langle \mathbf {u} _{n},\mathbf {u} _{n}\right\rangle \neq 0\right\}}

Debemos aplicar dos veces el principio de inducción para probar que

P = N × N . {\displaystyle P=\mathbb {N} \times \mathbb {N} .}

Comencemos por probar que

k N , ( 1 , k ) P . {\displaystyle \forall k\in \mathbb {N} ,\,(1,k)\in P.}

De la Proposición 1 se deduce que

u 1 , u 1 0 {\displaystyle \left\langle \mathbf {u} _{1},\mathbf {u} _{1}\right\rangle \neq 0}

lo cual por un lado, implica que (1, 1) está en P, y por otro, permite definir el vector

(1) proy u 1 ( v 2 ) = ( u 1 , v 2 u 1 , u 1 ) u 1 {\displaystyle \operatorname {proy} _{\mathbf {u} _{1}}\left(\mathbf {v_{2}} \right)=\left({\frac {\left\langle \mathbf {u} _{1},\mathbf {v_{2}} \right\rangle }{\left\langle \mathbf {u} _{1},\mathbf {u} _{1}\right\rangle }}\right)\mathbf {u} _{1}}

Por la linealidad del producto interno, se tiene

u 1 , u 2 = u 1 , v 2 proy u 1 ( v 2 ) = u 1 , v 2 u 1 , proy u 1 ( v 2 ) {\displaystyle \left\langle \mathbf {u} _{1},\mathbf {u} _{2}\right\rangle =\left\langle \mathbf {u} _{1},\mathbf {v} _{2}-\operatorname {proy} _{\mathbf {u} _{1}}\left(\mathbf {v} _{2}\right)\right\rangle =\left\langle \mathbf {u} _{1},\mathbf {v} _{2}\right\rangle -\left\langle \mathbf {u} _{1},\operatorname {proy} _{\mathbf {u} _{1}}\left(\mathbf {v} _{2}\right)\right\rangle }

que, en (1), queda

u 1 , u 2 = u 1 , v 2 u 1 , ( u 1 , v 2 u 1 , u 1 ) u 1 {\displaystyle \left\langle \mathbf {u} _{1},\mathbf {u} _{2}\right\rangle =\left\langle \mathbf {u} _{1},\mathbf {v} _{2}\right\rangle -\left\langle \mathbf {u} _{1},\left({\frac {\left\langle \mathbf {u} _{1},\mathbf {v_{2}} \right\rangle }{\left\langle \mathbf {u} _{1},\mathbf {u} _{1}\right\rangle }}\right)\mathbf {u} _{1}\right\rangle }

finalmente, por la homogeneidad del producto interno tenemos

u 1 , u 2 = u 1 , v 2 ( u 1 , v 2 u 1 , u 1 ) u 1 , u 1 = u 1 , v 2 u 1 , v 2 = 0 {\displaystyle \left\langle \mathbf {u} _{1},\mathbf {u} _{2}\right\rangle =\left\langle \mathbf {u} _{1},\mathbf {v} _{2}\right\rangle -\left({\frac {\left\langle \mathbf {u} _{1},\mathbf {v_{2}} \right\rangle }{\left\langle \mathbf {u} _{1},\mathbf {u} _{1}\right\rangle }}\right)\left\langle \mathbf {u} _{1},\mathbf {u} _{1}\right\rangle =\left\langle \mathbf {u} _{1},\mathbf {v} _{2}\right\rangle -\left\langle \mathbf {u} _{1},\mathbf {v} _{2}\right\rangle =0}

luego

( 1 , 2 ) P . {\displaystyle (1,2)\in P.}

Procedemos por inducción, la hipótesis inductiva es

j ,   1 < j < k u 1 , u j = 0. {\displaystyle \forall j,\ 1<j<k\Longrightarrow \left\langle \mathbf {u} _{1},\mathbf {u} _{j}\right\rangle =0.}

La Proposición 1, permite definir

proy u j ( v k ) = ( u j , v k u j , u j ) u j {\displaystyle \operatorname {proy} _{\mathbf {u} _{j}}\left(\mathbf {v} _{k}\right)=\left({\frac {\left\langle \mathbf {u} _{j},\mathbf {v_{k}} \right\rangle }{\left\langle \mathbf {u} _{j},\mathbf {u} _{j}\right\rangle }}\right)\mathbf {u} _{j}}

con lo cual, análogamente al caso j = 2, se tiene

u 1 , u k = u 1 , v k j = 1 k 1 ( u j , v k u j , u j ) u 1 , u j = u 1 , v k u 1 , v k = 0. {\displaystyle \left\langle \mathbf {u} _{1},\mathbf {u} _{k}\right\rangle =\left\langle \mathbf {u} _{1},\mathbf {v} _{k}\right\rangle -\sum _{j=1}^{k-1}\left({\frac {\left\langle \mathbf {u} _{j},\mathbf {v_{k}} \right\rangle }{\left\langle \mathbf {u} _{j},\mathbf {u} _{j}\right\rangle }}\right)\left\langle \mathbf {u} _{1},\mathbf {u} _{j}\right\rangle =\left\langle \mathbf {u} _{1},\mathbf {v} _{k}\right\rangle -\left\langle \mathbf {u} _{1},\mathbf {v_{k}} \right\rangle =0.}

Esto demuestra que

k N , ( 1 , k ) P {\displaystyle \forall k\in \mathbb {N} ,\,(1,k)\in P}

es decir, todo vector en E {\displaystyle {\mathcal {E}}} es perpendicular a u1, con excepción del mismo u1.

Aplicaremos inducción sobre n, considérese la hipótesis inductiva

j < n , ( j , k ) P {\displaystyle \forall j<n,(j,k)\in P}

también puede escribirse

j < n , k N , ( j < k u j , u k = 0 u j , u j 0 ) {\displaystyle \forall j<n,\forall k\in \mathbb {N} ,\left(j<k\Longrightarrow \left\langle \mathbf {u} _{j},\mathbf {u} _{k}\right\rangle =0\land \left\langle \mathbf {u} _{j},\mathbf {u} _{j}\right\rangle \neq 0\right)}

La Proposición 1 garantiza la segunda condición de la conjunción lógica, con lo cual sólo hace falta demostrar para n la primera.

u n , u k = u n , v k j = 1 k 1 ( u j , v k u j , u j ) u n , u j = u n , v k u n , v k = 0. {\displaystyle \left\langle \mathbf {u} _{n},\mathbf {u} _{k}\right\rangle =\left\langle \mathbf {u} _{n},\mathbf {v} _{k}\right\rangle -\sum _{j=1}^{k-1}\left({\frac {\left\langle \mathbf {u} _{j},\mathbf {v_{k}} \right\rangle }{\left\langle \mathbf {u} _{j},\mathbf {u} _{j}\right\rangle }}\right)\left\langle \mathbf {u} _{n},\mathbf {u} _{j}\right\rangle =\left\langle \mathbf {u} _{n},\mathbf {v} _{k}\right\rangle -\left\langle \mathbf {u} _{n},\mathbf {v_{k}} \right\rangle =0.}

por lo tanto

P = N × N {\displaystyle P=\mathbb {N} \times \mathbb {N} \quad \blacksquare }

Los conjuntos así definidos satisfacen la siguiente relación.

Proposición 3

Los sistemas de vectores

B = { v 1 , v 2 , v k } , E = { u 1 , u 2 , u k } {\displaystyle {\mathcal {B}}=\left\{\mathbf {v} _{1},\mathbf {v} _{2},\dots \mathbf {v} _{k}\right\},\,{\mathcal {E}}=\left\{\mathbf {u} _{1},\mathbf {u} _{2},\dots \mathbf {u} _{k}\right\}}

generan el mismo subespacio vectorial.

Para obtener una base ortonormal a partir de E {\displaystyle {\mathcal {E}}} , basta con dividir entre la norma de cada vector de la base hallada: e k = u k | | u k | | = u k u k , u k {\displaystyle \mathbf {e} _{k}={\mathbf {u} _{k} \over ||\mathbf {u} _{k}||}={\mathbf {u} _{k} \over {\sqrt {\langle \mathbf {u} _{k},\mathbf {u} _{k}\rangle }}}}

Ejemplos

  • Dada B = { v 1 , v 2 } {\displaystyle {\mathcal {B}}=\left\{\mathbf {v} _{1},\mathbf {v} _{2}\right\}} una base de R 2 {\displaystyle \mathbb {R} ^{2}} definida por

    { v 1 = [ 2 1 ] v 2 = [ 1 4 ] {\displaystyle \left\{{\begin{array}{rcl}\mathbf {v} _{1}&=&{\begin{bmatrix}2\\1\end{bmatrix}}\\\mathbf {v} _{2}&=&{\begin{bmatrix}1\\4\end{bmatrix}}\end{array}}\right.}

    mediante el proceso de Gram-Schmidt es posible construir una base ortogonal E = { u 1 , u 2 } {\displaystyle {\mathcal {E}}=\left\{\mathbf {u} _{1},\mathbf {u} _{2}\right\}} con respecto al producto interno usual de R 2 {\displaystyle \mathbb {R} ^{2}} .

    ( a , b ) , ( c , d ) = a c + b d {\displaystyle \left\langle (a,b),(c,d)\right\rangle =ac+bd} .

    Se calculan los vectores u1 y u2 a partir de las fórmulas.

    { u 1 = v 1 = [ 2 1 ] proy u 1 ( v 2 ) = u 1 , v 2 u 1 , u 1 u 1 = [ 12 5 6 5 ] u 2 = v 2 proy u 1 ( v 2 ) = [ 7 5 14 5 ] {\displaystyle \left\{{\begin{array}{rlcl}\mathbf {u} _{1}=&\mathbf {v} _{1}&=&{\begin{bmatrix}2\\1\end{bmatrix}}\\&\operatorname {proy} _{\mathbf {u} _{1}}\left(\mathbf {v} _{2}\right)&=&{\frac {\left\langle \mathbf {u} _{1},\mathbf {v} _{2}\right\rangle }{\left\langle \mathbf {u} _{1},\mathbf {u} _{1}\right\rangle }}\mathbf {u} _{1}={\begin{bmatrix}{\frac {12}{5}}\\{\frac {6}{5}}\end{bmatrix}}\\\mathbf {u} _{2}=&\mathbf {v} _{2}-\operatorname {proy} _{\mathbf {u} _{1}}\left(\mathbf {v} _{2}\right)&=&{\begin{bmatrix}-{\frac {7}{5}}\\{\frac {14}{5}}\end{bmatrix}}\end{array}}\right.}

    nótese que

    [ 7 5 14 5 ] = 7 5 [ 1 2 ] {\displaystyle {\begin{bmatrix}-{\frac {7}{5}}\\{\frac {14}{5}}\end{bmatrix}}={\frac {7}{5}}{\begin{bmatrix}-1\\2\end{bmatrix}}}

    de hecho, dado cualquier vector ( a , b ) R 2 {\displaystyle (a,b)\in \mathbb {R} ^{2}} y α R {\displaystyle \forall \;\alpha \in \mathbb {R} } se cumple

    ( a , b ) , α ( b , a ) = 0 {\displaystyle \left\langle (a,b),\alpha (-b,a)\right\rangle =0} .

  • Sea B = { v 1 , v 2 , v 3 } {\displaystyle {\mathcal {B}}=\left\{\mathbf {v} _{1},\mathbf {v} _{2},\mathbf {v} _{3}\right\}} el sistema definido por

    { v 1 = [ 2 1 1 ] v 2 = [ 1 0 10 ] v 3 = [ 2 3 11 ] {\displaystyle \left\{{\begin{array}{rcl}\mathbf {v} _{1}&=&{\begin{bmatrix}2\\1\\1\end{bmatrix}}\\\mathbf {v} _{2}&=&{\begin{bmatrix}1\\0\\10\end{bmatrix}}\\\mathbf {v} _{3}&=&{\begin{bmatrix}2\\-3\\11\end{bmatrix}}\end{array}}\right.}

    Aplicamos el proceso, seleccionamos por ejemplo

    u 1 = v 1 = [ 2 1 1 ] {\displaystyle \mathbf {u} _{1}=\mathbf {v} _{1}={\begin{bmatrix}2\\1\\1\end{bmatrix}}}

    y calculamos

    proy u 1 ( v 2 ) = u 1 , v 2 u 1 , u 1 u 1 = [ 4 2 2 ] {\displaystyle \operatorname {proy} _{\mathbf {u} _{1}}\left(\mathbf {v} _{2}\right)={\frac {\left\langle \mathbf {u} _{1},\mathbf {v} _{2}\right\rangle }{\left\langle \mathbf {u} _{1},\mathbf {u} _{1}\right\rangle }}\mathbf {u} _{1}={\begin{bmatrix}4\\2\\2\end{bmatrix}}}

    luego

    u 2 = v 2 proy u 1 ( v 2 ) = [ 3 2 8 ] {\displaystyle \mathbf {u} _{2}=\mathbf {v} _{2}-\operatorname {proy} _{\mathbf {u} _{1}}\left(\mathbf {v} _{2}\right)={\begin{bmatrix}-3\\-2\\8\end{bmatrix}}} .

    Análogamente se sigue para u3 que

    { proy u 1 ( v 3 ) = [ 4 2 2 ] proy u 2 ( v 3 ) = [ 24 7 16 7 64 7 ] u 3 = v 3 proy u 1 ( v 3 ) proy u 2 ( v 3 ) = [ 10 7 19 7 1 7 ] {\displaystyle \left\{{\begin{array}{rcc}\operatorname {proy} _{\mathbf {u} _{1}}\left(\mathbf {v} _{3}\right)&=&{\begin{bmatrix}4\\2\\2\end{bmatrix}}\\\operatorname {proy} _{\mathbf {u} _{2}}\left(\mathbf {v} _{3}\right)&=&{\begin{bmatrix}-{\frac {24}{7}}\\-{\frac {16}{7}}\\{\frac {64}{7}}\end{bmatrix}}\\\mathbf {u} _{3}=\mathbf {v} _{3}-\operatorname {proy} _{\mathbf {u} _{1}}\left(\mathbf {v} _{3}\right)-\operatorname {proy} _{\mathbf {u} _{2}}\left(\mathbf {v} _{3}\right)&=&{\begin{bmatrix}{\frac {10}{7}}\\-{\frac {19}{7}}\\-{\frac {1}{7}}\end{bmatrix}}\end{array}}\right.}

    finalmente se obtiene

    E = { u 1 , u 2 , u 3 } = { [ 2 1 1 ] , [ 3 2 8 ] , [ 10 7 19 7 1 7 ] } {\displaystyle {\mathcal {E}}=\left\{\mathbf {u} _{1},\mathbf {u} _{2},\mathbf {u} _{3}\right\}=\left\{{\begin{bmatrix}2\\1\\1\end{bmatrix}},{\begin{bmatrix}-3\\-2\\8\end{bmatrix}},{\begin{bmatrix}{\frac {10}{7}}\\-{\frac {19}{7}}\\-{\frac {1}{7}}\end{bmatrix}}\right\}}

    que es una base ortogonal de R3 con respecto al producto escalar canónico.

Descripción formal

Una manera de expresar el algoritmo explícitamente es a través de pseudocódigo. Se construye, para ello, una función con las siguientes características.

  • Tiene como entrada un conjunto B {\displaystyle {\mathcal {B}}} no vacío de vectores linealmente independientes.
  • Recibe dos instrucciones iterativas anidadas.
    1. Una estructura para cada, que asigna a v un vector de la entrada, por cada iteración.
    2. Una estructura mientras, que asigna a u el vector ortogonal a todos los u calculados en las iteraciones previas.
    En cada iteración, se ejecutan las funciones
    1. Proy, la cual calcula la proyección ortogonal de un vector sobre otro. Se define matemáticamente como sigue.
      Proy : V × V V , Proy ( v 1 , v 2 ) = ( v 1 , v 2 v 2 2 ) v 2 {\displaystyle \operatorname {Proy} :V\times V\longrightarrow V,\,\operatorname {Proy} \left(v_{1},v_{2}\right)=\left({\frac {\left\langle v_{1},v_{2}\right\rangle }{\left\|v_{2}\right\|^{2}}}\right)v_{2}} donde V es un espacio vectorial.
    2. obtener, como su nombre lo indica, obtiene el elemento de un conjunto dado su ordinal.
  • Devuelve finalmente un conjunto E {\displaystyle {\mathcal {E}}} de vectores ortogonales.
Algoritmo Gram-Schmidt

función ortogonalizar ( B ) {\displaystyle \operatorname {ortogonalizar} ({\mathcal {B}})}

E , i 0 {\displaystyle {\mathcal {E}}\gets \emptyset ,\,i\gets 0}
para v {\displaystyle \mathbf {v} \,} en B {\displaystyle {\mathcal {B}}\,} haga
u v , j 0 {\displaystyle \mathbf {u} \gets \mathbf {v} ,\,j\gets 0}
mientras i > j {\displaystyle i>j}
u u Proy ( v , obtener ( E , j ) ) , j j + 1 {\displaystyle \mathbf {u} \gets \mathbf {u} -\operatorname {Proy} \left(\mathbf {v} ,\operatorname {obtener} ({\mathcal {E}},j)\right),\,j\gets j+1}
agregue u {\displaystyle \mathbf {u} \,} a E {\displaystyle {\mathcal {E}}}
i i + 1 {\displaystyle i\gets i+1}
devuelva E {\displaystyle {\mathcal {E}}}

Para obtener una base ortonormal, basta normalizar los elementos de E {\displaystyle {\mathcal {E}}} .

Proceso de ortogonalización de Gram-Schmidt con el método de Gauss

Dada una matriz M cuyos vectores fila son los vectores de una base a ortogonalizar, si se aplica la eliminación Gaussiana por filas a la matriz ( M M t | M ) {\displaystyle (M\cdot M^{t}|M)} .

Ejemplo

Se realiza con la eliminación de Gauss la ortogonalización de Gram-Schmidt a la base dada por las filas de M {\displaystyle M} :

2 1 1
1 0 10
2 -3 11

  Para ello escribimos a la derecha la matriz de su producto escalar M M t {\displaystyle M\cdot M^{t}}

6 12 12 2 1 1
12 101 112 1 0 10
12 112 134 2 -3 11

  Y se realiza la eliminación Gaussiana

A Fila2 le restamos la Fila1 por 2

A Fila3 le restamos la Fila1 por 2

6 12 12 2 1 1
0 77 88 -3 -2 8
0 88 110 -2 -5 9

A Fila3 por 7 le restamos la Fila2 por 8 

6 12 12 2 1 1
0 77 88 -3 -2 8
0 0 66 10 -19 -1

Las filas de la derecha son una base ortogonal,

* * * 2 1 1
* * * -3 -2 8
* * * 10 -19 -1

cuyos vectores son proporcionales a los que se obtuvieron anteriormente con el proceso de Gram-Schmidt.

Referencias

  1. Sullivan, Michael. Trigonometría y geometría analítica (4ª edición). México: Pearson educación. p. 403. ISBN 9789688809433. 
Control de autoridades
  • Proyectos Wikimedia
  • Wd Datos: Q475239
  • Wd Datos: Q475239