On my road to understanding linear algebra for the sake of machine learning, linear transformation of vectors is the topic that I found most challenging to understand, at the same time I was fascinated by it. Understanding the math behind the linear transformation and then visualizing the change is a satisfying experience. So today in this blog, I will make you know the meaning of linear transformation of vectors in the simplest way possible. But before you proceed, consider skimming through this article on linear independence and the span of vectors. This will give you sufficient insight into the fundamental of the linear relationship between vectors that is required to understand this article.

## What is Linear Transformation?

As the term suggests, linear transformation of a vector means to transform a vector in such a way that the resulting vector and the original vector share a linear relationship. Consider two simple vectors \((1, 1)\) and \((-1, -1)\) in a two-dimensional vector space.

As you can see in the image, the vector \((-1,-1)\) (blue vector) is a linear transformation of \((1,1)\) (red vector). In layman’s terms, the rotation of the red vector by 180 degrees results in the formation of the blue vector.

*Okay cool! But what is a linear transformation in terms of mathematics?*

A linear transformation is just another function that takes in some input and throws out the corresponding output, requiring that this output is linearly dependent on the input. In the example above, the output vector \(v_2\) can be described as \(-1*v_1\). Hence, it is safe to say that \(v_2\) is the resultant vector of linear transformation of \(v_1\).

## Understanding the change in vector spaces in linear transformation

It is important to understand that when we talk about transformation, we are talking about two vector spaces: one before transformation and the other after transformation. Let us consider the above example once again. This time, we will go through the transformation considering the corresponding vector spaces.

Let \(v_1\) be the vector in vector space \(V\). Recalling the article on span of vectors, we can rewrite the vector \(v_1\) as \(1\hat{i} + 1\hat{j} \), where \(i\) and \(j\) are the basis vectors of vector space \(V\). When we transform this vector, we are changing the vector space, hence using this same linear relationship, we can plot the landing vector provided we have the basis of the new vector space.

Let us assume that the new vector space is \(W\). Considering that we want to rotate the vectors by \(180^\circ\), the basis of the new vector space will be \((-1, 0)\) and \((0,-1)\). Hence, the transformed vector in vector space \(W\) can be described by the same relationship, that is, \(1\hat{a} + 1\hat{b} \), where \(a\) and \(b\) are the basis vectors of new vector space \(W\). The resultant we get is \((-1, -1)\).

This concept can generally be illustrated as:

\(

\left[\begin{matrix}

x & y

\end{matrix}\right] \cdot

\left[\begin{matrix}

\hat{i} \\ \hat{j}

\end{matrix}\right]

\rightarrow

\left[\begin{matrix}

x & y

\end{matrix}\right] \cdot

\left[\begin{matrix}

\hat{a} \\ \hat{b}

\end{matrix}\right]

\)

This proves that the landing vector of linear transformation can be determined, provided the basis of the transformed vector space\(W\) is known.

## Conclusion

In this article, we understood the meaning of linear transformation and how the resultant vector for any vector can be determined if the basis of transformed vector space is known. I would recommend you to go a step further and try different transformations and visualize the effect. Once the equation is formed and determined, visualizing the effect of mathematics on different vectors is fascinating!