orthonormalization            package:far            R Documentation

_O_r_t_h_o_n_o_r_m_a_l_i_z_a_t_i_o_n _o_f _a _s_e_t _o_f _a _m_a_t_r_i_x

_D_e_s_c_r_i_p_t_i_o_n:

     Gram-Schmidt orthogonalization of a matrix considering its columns
     as vectors. Normalization is provided as will.

_U_s_a_g_e:

     orthonormalization(u, basis=TRUE, norm=TRUE)

_A_r_g_u_m_e_n_t_s:

       u: a matrix (n x p) representing n different vectors  in a n
          dimensional space  

   basis: does the returned matrix have to be a basis 

    norm: does the returned vectors have to be normed 

_D_e_t_a_i_l_s:

     This is a simple application of the Gram-Schmidt algorithm of 
     orthogonalization (please note that this process was presented
     first by Laplace).

     The user provides a set of vector (structured in a matrix) and the
     function calculate a orthogonal basis of the same space. If
     desired, the returned basis can be normed, or/and completed to
     cover the hole space.

     If the number of vectors in 'u' is greater than the dimension of
     the space (that is if n > p), only the first p columns are taken
     into account to computed the result. A warning is also provided.

     The only assumption made on 'u' is that the span space is of size
     min(n,p). In other words, there must be no colinearities in the
     initial set of vector.

_V_a_l_u_e:

     The orthogonalized matrix obtained from 'u' where the vector are
     arranged in columns.

     If 'basis' is set to 'TRUE', the returned matrix is squared.

_A_u_t_h_o_r(_s):

     J. Damon

_E_x_a_m_p_l_e_s:

       mat1 <- matrix(c(1,0,1,1,1,0),nrow=3,ncol=2)
       orth1 <- orthonormalization(mat1, basis=FALSE, norm=FALSE)
       orth2 <- orthonormalization(mat1, basis=FALSE, norm=TRUE)
       orth3 <- orthonormalization(mat1, basis=TRUE, norm=TRUE)
       crossprod(orth1)
       crossprod(orth2)
       crossprod(orth3)

