Search for a tool
Gram-Schmidt Orthonormalization

Tool to calculate orthonormal bases of the subspace generated by vectors using the Gram-Schmidt algorithm (2D Plan, 3D or 4D Space) in formal calculation

Results

Gram-Schmidt Orthonormalization -

Tag(s) : Matrix

Share
dCode and more

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Thanks to your feedback and relevant comments, dCode has developed the best 'Gram-Schmidt Orthonormalization' tool, so feel free to write! Thank you!

# Gram-Schmidt Orthonormalization

## 4D Vectors Orthonormalization Calculator

### How to calculate an orthonormal basis with Gram-Schmidt?

From a set of vectors $\vec{v_i}$ and its corresponding orthonormal basis, composed of the vectors $\vec{e_i}$, then the Gram-Schmidt algorithm consists in calculating the orthogonal vectors $\vec{u_i}$ which will allow to obtain the orthonormal vectors $\vec{e_i}$ whose components are the following (the operator . is the scalar product on the vector space)

$$\vec{u_1} = \vec{v_1} \ , \quad \vec{e_1} = \frac{ \vec{u_1} } { \| \vec{u_1} \| }$$

$$\vec{u_2} = \vec{v_2} - \frac{ \vec{u_1} . \vec{v_2} }{ \vec{u_1} . \vec{u_1} } \vec{u_1} \ , \quad \vec{e_2} = \frac{ \vec{u_2} } { \| \vec{u_2} \| }$$

$$\vec{u_3} = \vec{v_3} - \frac{ \vec{u_1} . \vec{v_3} }{ \vec{u_1} . \vec{u_1} } \vec{u_1} - \frac{ \vec{u_2} . \vec{v_3} }{ \vec{u_2} . \vec{u_2} } \vec{u_2} \ , \quad \vec{e_3} = \frac{ \vec{u_3} } { \| \vec{u_3} \| }$$

$$\vec{u_k} = \vec{v_k} - \sum_{j=1}^{k-1} { \frac{ \vec{u_j} . \vec{v_k} }{ \vec{u_j} . \vec{u_j} } \vec{u_j} } \ , \quad \vec{e_k} = \frac{ \vec{u_k} } { \| \vec{u_k} \| }$$

Example: Vectors $\vec{v_1} = (1,2)$ and $\vec{v_2} = (1,0)$ from $\mathbb{R}^2$ (2D plane) have for orthonormal basis $\vec{e_1} = \left( \frac{1}{\sqrt{5}}, \frac{2}{\sqrt{5}} \right)$ and $\vec{e_2} = \left( \frac{2}{\sqrt{5}}, \frac{-1}{\sqrt{5}} \right)$

## Source code

dCode retains ownership of the online 'Gram-Schmidt Orthonormalization' tool source code. Except explicit open source licence (indicated CC / Creative Commons / free), any 'Gram-Schmidt Orthonormalization' algorithm, applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any 'Gram-Schmidt Orthonormalization' function (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and no data download, script, copy-paste, or API access for 'Gram-Schmidt Orthonormalization' will be for free, same for offline use on PC, tablet, iPhone or Android ! dCode is free and online.

## Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!