If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

### Course: Linear algebra>Unit 2

Lesson 3: Transformations and matrix multiplication

# Compositions of linear transformations 1

Introduction to compositions of Linear Transformations. Created by Sal Khan.

## Want to join the conversation?

• What exactly the composition means?
• Intuitively, it means do something, and then do another thing to that something.
Formally, composition of functions is when you have two functions f and g, then consider g(f(x)). We call the function g of f "g composed with f".
So in this video, you apply a linear transformation, which warps the space in some way, and then apply another linear transformation to the already warped space. The result is a composition.
• I have two questions:

1. At he says that A will be l x n. That makes sense except how do we know which subset of R^n (vector x) or R^l (vector z) will be the column, and which will be the row?

2. This seems awfully familiar to the g(f(x)) and F(g(x)) stuff that I did in college algebra/Algebra 2. Is this related at all? Was the stuff they showed us in algebra kind of a precursor to this stuff?
• For an mxn matrix, the matrix is m tall and n wide, so m rows and n columns. An lxn matrix would be n wide and l tall, giving the transformation `A x⃑ = z⃑`.

And yes, it's very similar, just with more variables.
• What is the trace of a matrix?
• The trace of a matrix is the sum of the elements of the main diagonal of the matrix. It is only defined for square matrices.
• I found using the same x vector notation throughout every seperate transformation somewhat confusing. So is this what we learned ?
1. apply 1st transformation to relevant size Identity matrix :
dot product row vectors of matrix A with column vectors of Identity matrix and write the resulting scalars in same order as row number of A and column number of I. Notice that the result gives us the column vectors of A again. (mxn) and (nxn) matrices gives us a (mxn) matrix again.
2.apply second transformation on the resulting matrix in 1 above. Dot product each row vector of B with each column vector of A. Write the resulting scalars in same order as
row number of B and column number of A. (lxm) and (mxn) matrices give us (lxn) matrix. This is the composite linear transformation.
3.Now multiply the resulting matrix in 2 with the vector x we want to transform. This gives us a new vector with dimensions (lx1). (lxn) matrix and (nx1) vector multiplication.
• Here's what this video is getting at. Given:
`T(x) = Ax` and `S(x) = Bx`
We know:
`T∘S(x) = A(Bx) = (AB)x = ABx`
In other words, you can use matrix multiplication to combine multiple linear transformations into a single linear transformation.
• Another way to proof that (T o S)(x) is a L.T. is to use the matrix-vector product definitions of the L.T.'s T and S. Simply evaluate BA into a solution matrix K. And by the fact that all matrix-vector products are linear transformations and (T o S)(x) = Kx, (T o S)(x) is a linear transformation.
• At this point, we hadn't defined what a matrix-matrix product was.
• In determining the dimensions of the A matrix Sal stated that because x was an element of Rn the A matrix would have n columns. However, if the vector x is in Rn would that require the vector x to have n elements which would translate into A having n rows, not n columns? Why n rows?
• If r1, r2, etc. are the row vectors of A, then Ax = (x dot r1, x dot r2, ... , x dot rn), which means that A must have row vectors with n components (the same as x), which means that A is mxn - it has m rows and n columns.
• @ Khan talks about how X is a member of Rm.
But at the beginning of the video the X is a member of Rn
How did X go from being a member of Rm to Rn?
Thank You
• Sal is recycling varaible names. The x in Rm is a different x than the one in Rn.