Add the values to find an orthonormal basis for a set of vectors.
Use this Gram schmidt calculator that allows you to orthonormalize the set of vectors using the Gram-Schmidt process. It lets you find the orthonormal basis step by step using the orthogonalization process corresponding to the given vector set.
To use this calculator, follow these steps:
In linear algebra and numerical analysis, the Gram-Schmidt process is used for transforming a set of independent vectors into an orthonormal basis. This basis spans the same subspace as the original vector set. The process constructs an orthogonal set of vectors, meaning their dot product is zero. In addition to that, each vector in the new basis has a unit length (magnitude of 1). This orthonormal basis is helpful for certain applications of algebra and beyond. For a better understanding, let's say you have a set of vectors as
\(\ \{\vec{v_1},\ \vec{v_2},\ \vec{v_3},\ ...\vec{v_n}\}\)
The Gram-Schmidt process changes them in orthogonal vectors as
\(\ \{\vec{u_1},\ \vec{u_2},\ \vec{u_3},\ ...\vec{u_n}\}\), and in orthonormal set as\(\ \{\vec{e_1},\ \vec{e_2},\ \vec{e_3},\ ...\vec{e_n}\}\)
Start by Setting:
\(\ \vec{u_1}= \vec{v_1}\)
For all subsequent vectors\(\ \vec{v_i}(i>1)\) Now you need to subtract the projection of\(\ \vec{v_i}\) onto all the previous vectors\(\ \vec{v_j}(j<1)\) and set the result of all of that equal to\(\ \vec{u_i}\)
Use the following formula to find the projection of\(\ \vec{v_i}\) onto\(\ \vec{u_j}:\)
\(\text{proj}_{\vec{u}_j} (\vec{v}_i) = \frac{\vec{v}_i \cdot \vec{u}_j}{\vec{u}_j \cdot \vec{u}_j} \vec{u}_j\)
The formula for\(\ \vec{u_i}:\) \(\vec{u_i}= \vec{v_i}-\sum_{j=1}^{\ i-1}a_i\ proj_{uj}(\vec{v_i})\)
To find the orthonormal basis, normalize each vector\(\ \vec{v_i}\) by dividing it with its magnitude\(\ | \vec{u_i}|:\)
It is widely used in various fields like computer science, physics, statistics, and machine learning also in QR decomposition, etc.
Orthonormalize the set of the vectors\(\ V_1 = \begin{bmatrix} 1 \\ 1 \\ \end{bmatrix} \ , V_2 = \begin{bmatrix} 2 \\ 1 \\ \end{bmatrix} \) , using the Gram-Schmidt process.
Solution:
Gram-Schmidt process,\(\vec{u_k} = \vec{v_k} - \sum_{j=1}^{k-1} \text{proj}_{\vec{u_j}} (\vec{v_k})\)
Where,
\(\ proj_{\vec{u_j}} (\vec{v_k}) = \frac{\vec{u_j} \cdot \vec{v_k}}{|\vec{u_j}|^2} \vec{u_j}\) is a vector projection.
The Normalized Vector is
\(\vec{e_k} = \frac{ \vec{u_k}}{|{\vec{u_k}}|}\)
Step 1:
\(\vec{u_1} \ = \ \vec{v_1} \ = \ \begin{bmatrix} 1 \\ 1 \\ \end{bmatrix}\) \(\vec{u_1} \ = \ \vec{v_1} \ = \ \begin{bmatrix} 0.71 \\ 0.71 \\ \end{bmatrix}\)
Step #2: (Find Vector Projection)
\(\text{proj}_{\vec{u_1}} (\vec{v_2}) = \begin{bmatrix} 1.5 \\ 1.5 \\ \end{bmatrix}\)
Vector Subtraction:
\(\vec{u_2} = \vec{v_2} - \text{proj}_{\vec{u_1}} (\vec{v_2}) = \begin{bmatrix} 0.5 \\ -0.5 \end{bmatrix}\)
Calculate Unit Vector:
\(\vec{e_2} = \frac{ \vec{u_2}}{|{\vec{u_2}}|} \ = \ \begin{bmatrix} 0.71 \\ -0.71 \\ \end{bmatrix} \)
Result:
\(\begin{bmatrix} 0.71 \\ 0.71 \\ \end{bmatrix} \begin{bmatrix} 0.71 \\ -0.71 \\ \end{bmatrix} \)
To automate the calculations involved in this process, use a gram schmidt calculator that lets you obtain an orthonormal set of vectors for your specific problems.
An orthonormal basis is a specific type of basis used for spaces with an inner product (like the dot product in Euclidean space). It is a set of vectors spanning in the same spaces as the original vectors. An orthonormal basis is a specific type used for spaces with an inner product (like the dot product in Euclidean space). It is a set of vectors spanning in the same spaces as the original vectors. And, the orthonormal basis calculator is an instant way to find the basis of the space spanned by these vectors.
Using an orthonormal basis is very beneficial when you are dealing with decomposition, projections of vectors, or solving the system of equations. As it makes the calculations straightforward because the basis vectors are perpendicular to each other and have a unit length. It forms a well-defined coordinate system for a vector space.
In algebra, orthogonal means two vectors that are perpendicular to each other. It is possible if the result of two vectors dot product is zero.
For instance, if you have two following vectors:
\(\vec{u_1}, \vec{v_1}\) Then if \(\vec{u_1} \dot\ \vec{v_1}\)
They will be considered orthogonal. When it comes to orthogonal basis visualization, the vectors come in two-dimensional spaces.
For more complex, higher, or ordinary dimensions vector sets, an orthogonal basis calculator works best by using the Gram-Schmidt method.
The calculator functions by applying the Gram Schmidt orthogonalization process on a set of linearly independent vectors or on the columns of a matrix to get the orthonormal basis of the space that is spanned by the vectors.
No, the order does not matter. It does not affect the resulting subspace spanned by the orthonormal basis. However, it can affect the decomposition pattern of vectors you end up with on that basis.
Yes, you can apply Gram-Schmidt Process to linearly dependent vectors but it will stop providing useful results when it reaches the zero vector. In simple words, it finds linear dependency, but it can't provide the full basis if the vectors are not linearly dependent.
Orthogonal vectors are the vectors that are 90 degrees from each other. While the orthonormal vectors are orthogonal and additionally also have a vector length of 1.
From the source of Wikipedia: Gram–Schmidt process
From the source of math.hmc.edu: Gram–Schmidt Method