Introduction
In this article, we will study the Gram-Schmidt approach to orthogonalization of vectors. In the process, we will build an intuition to operations from a geometric perspective with an interactive demonstration.
In this article, we will study the Gram-Schmidt approach to orthogonalization of vectors. In the process, we will build an intuition to operations from a geometric perspective with an interactive demonstration.
To understand orthogonalization of vectors, we recommend familiarity with the concepts in
Follow the above links to first get acquainted with the corresponding concepts.
We saw in the earlier demo that the dot product of two vectors is zero if the angle between them is 90 degrees, since \( \cos 90^\circ = 0 \). Such non-zero vectors with a zero dot product are said to be mutually orthogonal.
Also, if two orthogonal vectors are also unit vectors, then they are said to be orthonormal.
If a set of vectors is the basis for a space and they are also mutually orthonormal, then they are known as the orthonormal basis of that space. Note that the X-axis and the Y-axis are the orthonormal basis of a Cartesian coordinate system and any point on that space can be defined in terms of their X and Y coordinates.
An understanding of orthogonal or orthonormal vectors is important for ML applications.
Data or models seldom automatically lead to orthogonal vectors. But many applications, such as machine learning, benefit from the representation of the dataset along orthonormal basis. For such applications of linear algebra, it is a common practice to discover the orthonormal basis for any given set of vectors.
Orthogonalization is the process used to arrive at orthogonal vectors from any given set of vectors. The popular algorithm used for this approach is known as the Gram-Schmidt approach.
Here's how the Gram-Schmidt approach for orthgonalization works for a set of vectors \( \{\va_1, \ldots, \va_n \} \) into a set of mutually orthogonal vectors \( \{\vx_1, \ldots, \vx_n \} \)
Interact with the orthogonalization demo next to get a good intuitive feel for the process. Check out what happens when you change either of the input vectors. Note the change in the projection and the resulting orthogonalization result.
In this demo, \( \text{proj}_{\va}(\vb) \) is the projection of \( \vb \) on \( \va \). It is calculated as
$$ \text{proj}_{\va}(\vb) = \frac{ \va \cdot \vb}{ \vb \cdot \vb} \va $$
Also, \( \text{orth}_{\va}(\vb) \) is the component of \( \vb \) that is orthogonal to \( \va \). It is calculated as
$$ \text{orth}_{\va}(\vb) = \vb - \text{proj}_{\va}(\vb) $$
Thus, intuitively, it can be seen that \( \vb \) can be split into two components — one that is along the same direction as \( \va \) and the remaining which is orthogonal to that direction. This important property is used in several linear algebra techniques.
Now that you are an expert in vectors, it is time to build expertise in other topics in linear algebra.
Help us create more engaging and effective content and keep it free of paywalls and advertisements!
Please share your comments, questions, encouragement, and feedback.