search
Search
Login
Unlock 100+ guides
menu
menu
web
search toc
close
Comments
Log in or sign up
Cancel
Post
account_circle
Profile
exit_to_app
Sign out
What does this mean?
Why is this true?
Give me some examples!
search
keyboard_voice
close
Searching Tips
Search for a recipe:
"Creating a table in MySQL"
Search for an API documentation: "@append"
Search for code: "!dataframe"
Apply a tag filter: "#python"
Useful Shortcuts
/ to open search panel
Esc to close search panel
to navigate between search results
d to clear all current filters
Enter to expand content preview
icon_star
Doc Search
icon_star
Code Search Beta
SORRY NOTHING FOUND!
mic
Start speaking...
Voice search is only supported in Safari and Chrome.
Navigate to
check_circle
Mark as learned
thumb_up
0
thumb_down
0
chat_bubble_outline
0
Comment
auto_stories Bi-column layout
settings

Guide on Linear Transformations in Linear Algebra

schedule Aug 12, 2023
Last updated
local_offer
Linear Algebra
Tags
mode_heat
Master the mathematics behind data science with 100+ top-tier guides
Start your free 7-days trial now!
Definition.

Linear transformations

A linear transformation is a transformation T:RnRm that satisfies the following two properties:

  • additive property: T(v+w)=T(v)+T(w) for all v,wRn.

  • homogeneity property: T(kv)=kT(v) for all vRn and kR.

Example.

Functions as linear transformation

Suppose f:RR is defined by f(x)=5x. Show that f is a linear transformation.

Solution. Since functions transform the input x into some output y, functions can also be treated as transformations. To prove that a function is a linear transformation, we must check that the function possesses the additive and homogeneity properties.

For any value x and y in R, we have:

f(x+y)=5(x+y)=5x+5y=f(x)+f(y)

This means that f satisfies the additive property.

We now check for the homogeneity property:

f(kx)=5(kx)=k(5x)=kf(x)

Since both criteria are satisfied, f(x) is a linear function.

Example.

Non-linear transformation

Consider the following transformation T:R2R2 defined below. Is this a linear transformation?

T((x1x2))=(x1+x2x1+2)

Solution. Let's check for the homogeneity property:

T(k(x1x2))=T((kx1kx2))=(kx1+kx2kx1+2)k(x1+x2x1+2)

Since T does not satisfy the homogeneity property, T is not a linear transformation. Note that the +2 term is what makes T non-linear. If the +2 was replaced by say 3x2, then T would be a linear transformation.

Theorem.

Linear transformations map the zero vector to the zero vector

If T:RnRm is a linear transformation, then:

T(0)=0

Any transformation that does not satisfy this must be non-linear. Note that the converse is not true, that is, T(0)=0 does not necessarily imply that T is linear. We will see an example of this shortly.

Proof. If T is a linear transformation, then the homogeneity property must hold for any scalar k, that is:

T(kx)=kT(0)

Let's set k=0 to get:

T(0)=0

This completes the proof.

Example.

Showing that a transformation is non-linear

Consider the following two functions below. Are they linear transformations?

f1(x)=2x+1,f2((x1x2))=(x1x20)

Solution. We can use theoremlink to easily check if f1 is non-linear:

f1(0)=2(0)+10

This means that f1 is not linear. This may be mind-blowing 🤯 since we all know that f1 is an equation of a straight line. f1 is indeed a linear equation, but f1 is not considered a linear transformation in the world of linear algebra.

Let's now check the linearity of f2 by first using theoremlink:

f2(0)=(00)

Unlike f1, we have that f2 satisfies theoremlink. However, we still cannot conclude that f2 is linear - theoremlink only tells us that a transformation is non-linear if T(0)0. We must check the two defining properties once again - let's check the homogeneity property:

f2((kx1kx2))=(k2x1x20)k(x1x20)

Since the homogeneity property is not satisfied, we conclude that f2 is not a linear transformation.

Theorem.

Linear transformation as matrix-vector product

Let T:RnRm be a linear transformation. T can be expressed as a matrix-vector product:

T(x)=Ax

Where x is a vector in Rn and A is an m×n matrix.

Proof. Any vector x can be expressed as a linear combination of n standard basis vectors e1,e2,,en like so:

x=x1e1+x2e2++xnen

Let's apply a linear transformation T on both sides to get:

T(x)=T(x1e1+x2e2++xnen)

Since T is a linear transformation, we can use the additive and homogeneity properties to get:

T(v)=T(x1e1+x2e2++xnen)=T(x1e1)+T(x2e2)++T(xnen)=x1T(e1)+x2T(e2)++xnT(en)=(|||T(e1)T(e2)T(en)|||)(x1x2xn)=Ax

Here, note the following:

  • the second-to-last step used theoremlink to rewrite the linear combination using a matrix-vector product.

  • A is an m×n matrix whose columns are the transformed standard basis vectors T(e1), T(e2), , T(en).

This means we can convert any linear transformation to a matrix-vector product by applying the transformation to the standard basis vectors! This completes the proof.

Example.

Writing a transformation as a matrix product

Consider the linear transformation T:R2R3 below:

T((x1x2))=(2x1+3x2x1+2x23x1+x2)

Write the transformation in matrix-vector product form.

Solution. The standard basis vectors for R2 are:

e1=(10),e2=(01)

Applying transformation T on these basis vectors yields:

T(e1)=(213),T(e2)=(321)

By theoremlink, the linear transformation can be expressed as:

T(x)=(231231)(x1x2)

Geometric interpretation of matrix transformation

Geometrically, a transformation can be interpreted as an operation that changes the position of the input. For instance, consider the following grid:

Now, consider the following linear transformation:

T((x1x2))=(2x1+x2x1+3x2)=(2113)(x1x2)

By applying this transformation to all the data points over the grid lines, we end up with the following result:

Notice how the grid lines are still straight and parallel - this is guaranteed because T is a linear transformation. In contrast, consider a non-linear transformation like so:

T((x1x2))=(cos(x1x2)sin(x1+x2))

Transforming our grid lines will result in non-straight non-parallel lines:

Let's now see what happens to the standard basis vectors after a linear transformation:

T(e1)=(2113)(10)=(21),T(e2)=(2113)(01)=(13)

Notice how the transformed vectors are actually just the columns of the transformation matrix! Let's define e1 and e2 as the transformed standard basis vectors, that is:

  • e1=T(e1)

  • e2=T(e2)

Let's visualize the standard basis vectors before and after the transformation:

Standard basis vectors before T

Standard basis vectors after T

Now, suppose we focus on a single point:

x=(21)

Let's visualize this point:

Point before T

Point after T

Here, we can make the following observations:

  • before the transformation - we see that x can be represented using 2 e1 and 1 e2.

  • after the transformation - we see that T(x) can be represented using 2 e1 and 1 e2.

The key here is that the point x is represented using the same linear combinations of the standard basis vectors before and after the transformation.

Let's also verify this mathematically. We can express x using the standard basis vectors:

x=(21)=2(10)+1(01)=2e1+e2

This tells us that x can be represented using two e1 and one e2.

Let's now transform x to get:

T(x)=(2113)(21)=2(21)+1(13)=2e1+e2

This tells us T(x) can be represented using two e1 and one e2.

Example.

Finding the transformed standard basis vectors

Consider the linear transformation T:R3R3 below:

T((x1x2x3))=(217131245)(x1x2x3)

Without doing any computation, derive the transformed standard basis vectors.

Solution. Since we are in R3, we will have 3 standard basis vectors e1, e2 and e3. The transformed vectors are simply the columns of the transformation matrix:

e1=T(e1)=(212),e2=T(e2)=(134),e3=T(e3)=(715)
robocat
Published by Isshin Inada
Edited by 0 others
Did you find this page useful?
thumb_up
thumb_down
Comment
Citation
Ask a question or leave a feedback...
Cookie Policy
close
By using our site, you acknowledge that you agree to our Privacy Policy and Terms and Conditions.