Matrices and Matrix Algebra > Linear Transformation & Vector Transformation

**Contents **(Click to skip to that section):

- Vector Spaces
- Vector Transformation
- Linear Transformation
- How to Graph Transformations
- Other types of transformations

## Vector Spaces

A vector space is a collection of *vectors *which can be added and multiplied by scalars. It is probably one of the most important concepts in matrix algebra.

A “**scalar**” has magnitude. For example, a speed of 100 mph.

A “**vector**” has magnitude *and* direction.* For example, a velocity of 100 mph north. A vector can be represented in three ways:

- With an arrow on a coordinate graph.
- Using a variable, with two numbers (x,y) representing the vector moving x spaces in the horizontal direction and y spaces in the vertical direction.
- With matrix notation, with the top number representing the vector moving in the horizontal direction and the bottom number representing movement in the vertical direction.

## What is a Vector Space?

A vector space is a collection of vectors that has two requirements:

- Any two vectors can be added without leaving the space.
- Any two vectors can be scaled (multiplied) without leaving the space.

## Real Vector Spaces

Vector Spaces are often defined as R^{n} vector spaces, which are spaces of dimension *n *where adding or scaling any vector is possible. R stands for “Real” and these spaces include every vector of the same dimension as the space. For example, the R^{2} vector spaces includes *all* possible 2-D vectors. For example, the vectors (2,2), (9,0), and (11,5) are all 2-D vectors (ones that can be represented on an x-y axis). The vector space R^{3} represents three dimensions, R,4 represents four dimensions and so on.

Obviously, it’s practically impossible to deal with R^{n} vector spaces, because they contain every possible vector of n dimensions, up to infinity. Instead, we use subspaces, which are smaller vector spaces within a R^{n} vector space.

***A note on the definition of a vector.
**The definition “A “vector” has magnitude and direction” isn’t technically correct, but it gives you a better idea of what a vector is rather than the more formal definition of a vector, which is: a vector is an element of a vector space. That definition wouldn’t help much if you didn’t already have some idea about a vector needing magnitude and direction. As J. Nearing of the University of Miami points out: a car can have both magnitude and direction, but does that make it a vector? Obviously the answer is no, hence the need for the additional clarification.

Back to Top

## Vector Transformation

A vector transformation is a specific type of mapping where you associate vectors from one vector space with vectors in another space.

## The Role of Functions in Vector Transformations

Understanding functions is vital to understanding vector transformations. A function is where one input is mapped to exactly one output. Members of a set are mapped (associated) to unique members of another set. The following notation is used to define the process:

f: X→Y, where X is the domain and Y is the codomain. This just means that some function is mapping vectors in X to vectors in Y

**Vector transformations can be thought of as a type of function. **For example, if you map the members of a vector space R^{n} to unique members of another vector space Rp, that’s a function. It’s written in function notation as:

f: R^{n} → R^{p}

## Vector Transformation Example

Let’s say you had a vector transformation that mapped vectors in an R^{3} vector space to vectors in an R^{2} space. The general way to write the notation is:

f: R^{3} → R^{2}

A specific example could be:

f(x_{1},x_{2},x_{3}) = (X_{1}+3x_{2},4x_{3})

Note that f(x_{1},x_{2},x_{3}) has three vectors and so belongs in R^{3} and (X_{1}+3x,4x_{3}) has two vectors and so belongs in R^{2}.

In more familiar (at least, for matrix algebra!) notation, this example could also be written as:

Actually working out the vector transformation is the same as working out a function and involves some basic math. For example, let’s say you had the function f: x→ x^{2} and you wanted to transform (map) the number 2. You would insert it into the right hand part of the equation to get 2^{2}=4. Vector transformation works the same way.

For example, performing a vector transformation from f(2,3,4) to (X_{1}+3x_{2},4x_{3}) we get:

X_{1} = 2

X_{2} = 3

X_{3} = 4,

so:

(2 + 3(3),4(4)) = (2 + 9, 16) = (11,16)

Back to Top

## Linear Transformation

Linear transformation, sometimes called linear mapping, is a special case of a vector transformation.

**Definition**:

Let V And W be two vector spaces. The function T:V→W is a linear transformation if the following two properties are true for all u,v, ε, V and scalars C:

- Addition is preserved by T: T(
+*u*) = T(u)=T(v). In other words, if you add up two vectors*v*and**u**it’s the same as taking the transformation of each vector and then adding them.**v** - Scalar multiplication is preserved by t: T(
*c*u)=*c*T(u). In other words, if you multiply a vectorby a scalar C, this is the same as the transformation of*u*multiplied by scalar c.*u*

## How to Figure out if a Transformation is Linear

Applying rules 1 and 2 above will tell you if your transformation is a linear transformation. Part One, *Is Addition Preserved?* Works through rule 1 and Part Two, *Is Scalar Multiplication Preserved?* works through rule 2. Remember: Both rules need to be true for linear transformations.

**Sample Question: **Is the following transformation a linear transformation?

T(x,y)→ (x-y,x+y,9x)

### Part One: Is Addition Preserved?

Step 1: Give the vectors ** u **and

**(from rule 1) some components. I’m going to use**

*v**a*and

*b*here, but the choice is arbitrary:

**= (a**

*u*_{1}, a

_{2})

**= (b**

*v*_{1}, b

_{2})

Step 2: Find an expression for the addition part of the **left side** of the Rule 1 equation (we’re going to do the transformation in the next step):

(** u**+

**) = (a**

*v*_{1}, a

_{2}) + (b

_{1}, b

_{2})

**Adding these two vectors together**, we get:

((a

_{1}+ b

_{1}), (a

_{2}+ b

_{2}))

In matrix form, the addition is:

Step 3: Apply the transformation. We’re given the rule T(x,y)→ (x-y,x+y,9x), so transforming our additive vector from Step 2, we get:

T ((a_{1}+ b_{1}), (a_{2}+ b_{2})) =

((a_{1} + b_{1}) – (a_{2} + b_{2}),

(a_{1} + b_{1}) + (a_{2} + b_{2}),

9(a_{1} + b_{1})).

**Simplifying/Distributing using algebra:**

(a_{1} + b_{1} – a_{2} – b_{2},

a_{1} + b_{1} + a_{2} + b_{2},

9a_{1} + 9b_{1}).

**Set this aside for a moment: we’re going to compare this result to the result from the right hand side of the equation in a later step.**

Step 4: Find an expression for the **right side** of the Rule 1 equation, T(** u**) + T(

**). Using the same a/b variables we used in Steps 1 to 3, we get:**

*v*T((a

_{1},a

_{2}) + T(b

_{1},b

_{2}))

Step 5: Transform the vector u, (a_{1},a_{2}). We’re given the rule T(x,y)→ (x-y,x+y,9x), so transforming vector u, we get:

(a_{1} – a_{2},

a_{1} + a_{2},

9a_{1})

Step 6: Transform the vector v. We’re given the rule T(x,y)→ (x-y,x+y,9x), so transforming vector v, (a_{1},a_{2}), we get:

(b_{1} – b_{2},

b_{1} + b_{2},

9b_{1})

Step 7: Add the two vectors from Steps 5 and 6:

(a_{1} – a_{2}, a_{1} + a_{2}, 9a_{1}) + (b_{1} – b_{2}, b_{1} + b_{2}, 9b_{1}) =

((a_{1} – a_{2} + b_{1} – b_{2},

a_{1} + a_{2} + b_{1} – b_{2},

9a_{1} + 9b_{1})

Step 8: Compare Step 3 to Step 7. They are the same, so condition 1 (the additive condition) is satisfied.

### Part Two: Is Scalar Multiplication Preserved?

In other words, in this part we want to know if T(*c*u)=*c*T(u) is true for T(x,y)→ (x-y,x+y,9x). We’re going to use the same vector from Part 1, which is ** u **= (a

_{1}, a

_{2}).

Step 1: Work the **left side **of the equation, T(*c*u). First, multiply the vector by a scalar, c.

c * (a_{1}, a_{2}) = (c(a_{1}), c(a_{2}))

Step 2: Transform Step 1, using the rule T(x,y)→ (x-y,x+y,9x):

(ca_{1} – ca_{2},

ca_{1} + ca_{2},

9ca_{1})

Put this aside for a moment. We’ll be comparing it to the right side in a later step.

Step 3: Transform the vector u using the rule T(x,y)→ (x-y,x+y,9x). We’re working the **right side **of the rule 2 equation here:

(T(a_{1}, a_{2})=

a_{1} – a_{2}

a_{1} + a_{2}

9a_{1})

Step 4: Multiply Step 3 by the scalar, c.

(c(a_{1} – a_{2})

c(a_{1} + a_{2})

c(9a_{1}))

Distributing c using algebra, we get:

(ca_{1} – ca_{2},

ca_{1} + ca_{2},

9ca_{1})

Step 5: Compare Steps 2 and 4. they are the same, so the second rule is true. This function is a linear transformation.

## How to Graph Transformations

Once you’ve committed graphs of standard functions to memory, your ability to **graph transformations** is simplified. The eight basic function types are: sine, cosine, rational, absolute value, square root, cube (polynomial), square (quadratic) and linear; each has their own domain, range, and shape. When you transform one of these graphs, you shift it up, down, to the left, or to the right. Being able to** visualize a transformation **in your head and sketch it on paper is a valuable tool. Why? Sometimes the only way to solve a problem **is** to visualize the transformation in your head. While graphing calculators can be a valuable tool in developing your mathematical knowledge, eventually the calculator will only be able to help you so much.

## Graph Transformations: Steps

**Example Problem 1**: Sketch the graph of x^{2} shifted two units to the right and then write the equation for that graph.

Step 1: **Visualize the graph **of x^{3}, which is a cube (polynomial).

Step 2:** Visualize the transformation**. All you’re doing is shifting the graph two units to the right. Here’s what the transformed graph looks like:

Step 3: **Write the equation.** For any function, f(x), the graph of f(x-c) is the graph shifted two units to the right and the graph of f(x+c) is the graph shifted two units to the right. The question asks for two units to the right, so the final equation is f(x) = (x – 2)^{2}. **Caution**: the graph of x^{2} – 2 moves the graph *down* two units, not right!

**Example problem 2: **Sketch the graph of x^{2} + 2.

Step 1:** Visualize the graph** of x^{2}, which is one of the eight basic function types.

Step 2:** Sketch the graph**. For any function, f(x), a graph f(x) + c is the graph shifted up the y-axis and a graph f(x) – c is a graph shifted down the y-axis. Therefore, x^{2} + 2 is the graph of x^{2} shifted two units up the y-axis.

That’s it!

**Tip:** You can also flip graphs on the x-axis by adding a negative coefficient. For example, while x^{2} is a parabola above the x-axis, -x^{2} is a mirror image over the x-axis.

## Other types of transformations

**Box Cox Transformations**is a way to transform non-normal dependent variables into a normal shape.**Tukey Ladder of Powers**is a way to change the shape of a skewed distribution so that it becomes normal or nearly-normal.

**Confused and have questions?** Head over to Chegg and use code “CS5OFFBTS18” (exp. 11/30/2018) to get $5 off your first month of Chegg Study, so you can understand any concept by asking a subject expert and getting an in-depth explanation online 24/7.

**Comments? Need to post a correction?** Please post a comment on our *Facebook page*.