# 5.1: Linear Transformations

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$

( \newcommand{\kernel}{\mathrm{null}\,}\) $$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\id}{\mathrm{id}}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\kernel}{\mathrm{null}\,}$$

$$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$

$$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$

$$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\AA}{\unicode[.8,0]{x212B}}$$

$$\newcommand{\vectorA}[1]{\vec{#1}} % arrow$$

$$\newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow$$

$$\newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vectorC}[1]{\textbf{#1}}$$

$$\newcommand{\vectorD}[1]{\overrightarrow{#1}}$$

$$\newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}}$$

$$\newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}}$$

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\avec}{\mathbf a}$$ $$\newcommand{\bvec}{\mathbf b}$$ $$\newcommand{\cvec}{\mathbf c}$$ $$\newcommand{\dvec}{\mathbf d}$$ $$\newcommand{\dtil}{\widetilde{\mathbf d}}$$ $$\newcommand{\evec}{\mathbf e}$$ $$\newcommand{\fvec}{\mathbf f}$$ $$\newcommand{\nvec}{\mathbf n}$$ $$\newcommand{\pvec}{\mathbf p}$$ $$\newcommand{\qvec}{\mathbf q}$$ $$\newcommand{\svec}{\mathbf s}$$ $$\newcommand{\tvec}{\mathbf t}$$ $$\newcommand{\uvec}{\mathbf u}$$ $$\newcommand{\vvec}{\mathbf v}$$ $$\newcommand{\wvec}{\mathbf w}$$ $$\newcommand{\xvec}{\mathbf x}$$ $$\newcommand{\yvec}{\mathbf y}$$ $$\newcommand{\zvec}{\mathbf z}$$ $$\newcommand{\rvec}{\mathbf r}$$ $$\newcommand{\mvec}{\mathbf m}$$ $$\newcommand{\zerovec}{\mathbf 0}$$ $$\newcommand{\onevec}{\mathbf 1}$$ $$\newcommand{\real}{\mathbb R}$$ $$\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}$$ $$\newcommand{\laspan}[1]{\text{Span}\{#1\}}$$ $$\newcommand{\bcal}{\cal B}$$ $$\newcommand{\ccal}{\cal C}$$ $$\newcommand{\scal}{\cal S}$$ $$\newcommand{\wcal}{\cal W}$$ $$\newcommand{\ecal}{\cal E}$$ $$\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}$$ $$\newcommand{\gray}[1]{\color{gray}{#1}}$$ $$\newcommand{\lgray}[1]{\color{lightgray}{#1}}$$ $$\newcommand{\rank}{\operatorname{rank}}$$ $$\newcommand{\row}{\text{Row}}$$ $$\newcommand{\col}{\text{Col}}$$ $$\renewcommand{\row}{\text{Row}}$$ $$\newcommand{\nul}{\text{Nul}}$$ $$\newcommand{\var}{\text{Var}}$$ $$\newcommand{\corr}{\text{corr}}$$ $$\newcommand{\len}[1]{\left|#1\right|}$$ $$\newcommand{\bbar}{\overline{\bvec}}$$ $$\newcommand{\bhat}{\widehat{\bvec}}$$ $$\newcommand{\bperp}{\bvec^\perp}$$ $$\newcommand{\xhat}{\widehat{\xvec}}$$ $$\newcommand{\vhat}{\widehat{\vvec}}$$ $$\newcommand{\uhat}{\widehat{\uvec}}$$ $$\newcommand{\what}{\widehat{\wvec}}$$ $$\newcommand{\Sighat}{\widehat{\Sigma}}$$ $$\newcommand{\lt}{<}$$ $$\newcommand{\gt}{>}$$ $$\newcommand{\amp}{&}$$ $$\definecolor{fillinmathshade}{gray}{0.9}$$

## Outcomes

1. Understand the definition of a linear transformation, and that all linear transformations are determined by matrix multiplication.

Recall that when we multiply an $$m\times n$$ matrix by an $$n\times 1$$ column vector, the result is an $$m\times 1$$ column vector. In this section we will discuss how, through matrix multiplication, an $$m \times n$$ matrix transforms an $$n\times 1$$ column vector into an $$m \times 1$$ column vector.

Recall that the $$n \times 1$$ vector given by $\vec{x} = \left [ \begin{array}{r} x_1 \\ x_2\\ \vdots \\ x_n \end{array} \right ]\nonumber$ is said to belong to $$\mathbb{R}^n$$, which is the set of all $$n \times 1$$ vectors. In this section, we will discuss transformations of vectors in $$\mathbb{R}^n.$$

Consider the following example.

## Example $$\PageIndex{1}$$:A Function Which Transforms Vectors

Consider the matrix $$A = \left [ \begin{array}{ccc} 1 & 2 & 0 \\ 2 & 1 & 0 \end{array} \right ] .$$ Show that by matrix multiplication $$A$$ transforms vectors in $$\mathbb{R}^3$$ into vectors in $$\mathbb{R}^2$$.

Solution

First, recall that vectors in $$\mathbb{R}^3$$ are vectors of size $$3 \times 1$$, while vectors in $$\mathbb{R}^{2}$$ are of size $$2 \times 1$$. If we multiply $$A$$, which is a $$2 \times 3$$ matrix, by a $$3 \times 1$$ vector, the result will be a $$2 \times 1$$ vector. This what we mean when we say that $$A$$ transforms vectors.

Now, for $$\left [ \begin{array}{c} x \\ y \\ z \end{array} \right ]$$ in $$\mathbb{R}^3$$, multiply on the left by the given matrix to obtain the new vector. This product looks like $\left [ \begin{array}{rrr} 1 & 2 & 0 \\ 2 & 1 & 0 \end{array} \right ] \left [ \begin{array}{r} x \\ y \\ z \end{array} \right ] = \left [ \begin{array}{c} x+2y \\ 2x+y \end{array} \right ]\nonumber$ The resulting product is a $$2 \times 1$$ vector which is determined by the choice of $$x$$ and $$y$$. Here are some numerical examples. $\left [ \begin{array}{ccc} 1 & 2 & 0 \\ 2 & 1 & 0 \end{array} \right ] \left [ \begin{array}{c} 1 \\ 2 \\ 3 \end{array} \right ] = \ \left [ \begin{array}{c} 5 \\ 4 \end{array} \right ]\nonumber$ Here, the vector $$\left [ \begin{array}{c} 1 \\ 2 \\ 3 \end{array} \right ]$$ in $$\mathbb{R}^3$$ was transformed by the matrix into the vector $$\left [ \begin{array}{c} 5 \\ 4 \end{array}\right ]$$ in $$\mathbb{R}^2$$.

Here is another example: $\left [ \begin{array}{rrr} 1 & 2 & 0 \\ 2 & 1 & 0 \end{array} \right ] \left [ \begin{array}{r} 10 \\ 5 \\ -3 \end{array} \right ] = \ \left [ \begin{array}{r} 20 \\ 25 \end{array} \right ]\nonumber$

The idea is to define a function which takes vectors in $$\mathbb{R}^{3}$$ and delivers new vectors in $$\mathbb{R}^{2}.$$ In this case, that function is multiplication by the matrix $$A$$.

Let $$T$$ denote such a function. The notation $$T:\mathbb{R}^{n}\mapsto \mathbb{R}^{m}$$ means that the function $$T$$ transforms vectors in $$\mathbb{R}^{n}$$ into vectors in $$\mathbb{R}^{m}$$. The notation $$T(\vec{x})$$ means the transformation $$T$$ applied to the vector $$\vec{x}$$. The above example demonstrated a transformation achieved by matrix multiplication. In this case, we often write $T_{A}\left( \vec{x}\right) =A \vec{x}\nonumber$ Therefore, $$T_{A}$$ is the transformation determined by the matrix $$A$$. In this case we say that $$T$$ is a matrix transformation.

Below is a video on matrix transformations.

Recall the property of matrix multiplication that states that for $$k$$ and $$p$$ scalars, $A\left( kB+pC\right) =kAB+pAC\nonumber$ In particular, for $$A$$ an $$m\times n$$ matrix and $$B$$ and $$C,$$ $$n\times 1$$ vectors in $$\mathbb{R}^{n}$$, this formula holds.

In other words, this means that matrix multiplication gives an example of a linear transformation, which we will now define.

## Definition $$\PageIndex{1}$$:Linear Transformation

Let $$T:\mathbb{R}^{n}\mapsto \mathbb{R}^{m}$$ be a function, where for each $$\vec{x} \in \mathbb{R}^{n},T\left(\vec{x}\right)\in \mathbb{R}^{m}.$$ Then $$T$$ is a linear transformation if whenever $$k ,p$$ are scalars and $$\vec{x}_1$$ and $$\vec{x}_2$$ are vectors in $$\mathbb{R}^{n}$$ $$( n\times 1$$ vectors$$),$$ $T\left( k \vec{x}_1 + p \vec{x}_2 \right) = kT\left(\vec{x}_1\right)+ pT\left(\vec{x}_{2} \right)\nonumber$

Consider the following example.

## Example $$\PageIndex{2}$$:Linear Transformation

Let $$T$$ be a transformation defined by $$T:\mathbb{R}^3\to\mathbb{R}^2$$ is defined by $T\left [\begin{array}{c} x \\ y \\ z \end{array}\right ] = \left [\begin{array}{c} x+y \\ x-z \end{array}\right ] \mbox{ for all } \left [\begin{array}{c} x \\ y \\ z \end{array}\right ] \in\mathbb{R}^3\nonumber$ Show that $$T$$ is a linear transformation.

Solution

By Definition $$\PageIndex{1}$$ we need to show that $$T\left( k \vec{x}_1 + p \vec{x}_2 \right) = kT\left(\vec{x}_1\right)+ pT\left(\vec{x}_{2} \right)$$ for all scalars $$k,p$$ and vectors $$\vec{x}_1, \vec{x}_2$$. Let $\vec{x}_1 = \left [\begin{array}{c} x_1 \\ y_1 \\ z_1 \end{array}\right ], \vec{x}_2 = \left [\begin{array}{c} x_2 \\ y_2 \\ z_2 \end{array}\right ]\nonumber$ Then \begin{aligned} T\left( k \vec{x}_1 + p \vec{x}_2 \right) &= T \left( k \left [\begin{array}{c} x_1 \\ y_1 \\ z_1 \end{array}\right ] + p \left [\begin{array}{c} x_2 \\ y_2 \\ z_2 \end{array}\right ] \right) \\ &= T \left( \left [\begin{array}{c} kx_1 \\ ky_1 \\ kz_1 \end{array}\right ] + \left [\begin{array}{c} px_2 \\ py_2 \\ pz_2 \end{array}\right ] \right) \\ &= T \left( \left [\begin{array}{c} kx_1 + px_2 \\ ky_1 + py_2 \\ kz_1 + pz_2 \end{array}\right ] \right) \\ &= \left [\begin{array}{c} (kx_1 + px_2) + (ky_1 + py_2) \\ (kx_1 + px_2)- (kz_1 + pz_2) \end{array}\right ] \\ &= \left [\begin{array}{c} (kx_1 + ky_1) + (px_2 + py_2) \\ (kx_1 - kz_1) + (px_2 - pz_2) \end{array}\right ] \\ &= \left [\begin{array}{c} kx_1 + ky_1 \\ kx_1 - kz_1 \end{array}\right ] + \left [ \begin{array}{c} px_2 + py_2 \\ px_2 - pz_2 \end{array}\right ] \\ &= k \left [\begin{array}{c} x_1 + y_1 \\ x_1 - z_1 \end{array}\right ] + p \left [ \begin{array}{c} x_2 + y_2 \\ x_2 - z_2 \end{array}\right ] \\ &= k T(\vec{x}_1) + p T(\vec{x}_2) \end{aligned}\nonumber Therefore $$T$$ is a linear transformation.

Two important examples of linear transformations are the zero transformation and identity transformation. The zero transformation defined by $$T\left( \vec{x} \right) = \vec(0)$$ for all $$\vec{x}$$ is an example of a linear transformation. Similarly the identity transformation defined by $$T\left( \vec{x} \right) = \vec(x)$$ is also linear. Take the time to prove these using the method demonstrated in Example $$\PageIndex{2}$$.

We began this section by discussing matrix transformations, where multiplication by a matrix transforms vectors. These matrix transformations are in fact linear transformations.

## Theorem $$\PageIndex{1}$$:Matrix Transformations are Linear Transformations

Let $$T:\mathbb{R}^{n}\mapsto \mathbb{R}^{m}$$ be a transformation defined by $$T(\vec{x}) = A\vec{x}$$. Then $$T$$ is a linear transformation.

It turns out that every linear transformation can be expressed as a matrix transformation, and thus linear transformations are exactly the same as matrix transformations.

Below is a video on finding the domain and codomain of a linear transformation given the transformation matrix.

This page titled 5.1: Linear Transformations is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Ken Kuttler (Lyryx) .