 # Writing a composite transformation as a matrix multiplication I have two maliaseth0 2022-02-01 Answered
Writing a composite transformation as a matrix multiplication
I have two matrices, P and Q as follows:
$P=\left(\begin{array}{cc}\frac{1}{2}& \frac{\sqrt{3}}{2}\\ \frac{\sqrt{3}}{2}& -\frac{1}{2}\end{array}\right)$
$Q=\left(\begin{array}{cc}-\frac{1}{2}& \frac{\sqrt{3}}{2}\\ \frac{\sqrt{3}}{2}& \frac{1}{2}\end{array}\right)$
You can still ask an expert for help

## Want to know more about Matrix transformations?

• Live experts 24/7
• Questions are typically answered in as fast as 30 minutes
• Personalized clear answers

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it fumanchuecf
Step 1
Matrices work like functions. If you have functions $f:A\to B$ and $g:B\to C$, and a element $x\in A$, we do first f(x), then $g\left(f\left(x\right)\right)=\left(g×f\right)\left(x\right)$. Notice that the order is different, we applied f, then g, but the result ended up being $g×f$. It is the same for matrices.
Extra info. for you: The matrix of rotation by a angle θ is given by
$\left(\begin{array}{cc}\mathrm{cos}\theta & -\mathrm{sin}\theta \\ \mathrm{sin}\theta & \mathrm{cos}\theta \end{array}\right)$
This way, P is rotation by 60 deg and Q is rotation by 120 deg.
###### Not exactly what you’re looking for? lilwhitelieyc
Step 1
Here's the deal: operating on a point p by a transformation T is written T(p). That is, the point operated on goes to the right of the function being applied. If you wanted to then take the result,
$q=T\left(p\right)$
nd apply a transformation S, you'd write S(q). Substituting, you'd find that this was
$S\left(T\left(p\right)\right)$
Many important transformations can be written in the form of multiplication by a matrix, and one might conjecture that the definition of matrix multiplication was made so that
$T\left(p\right)=Mp$
where M is a matrix, would work out nicely. Given that, if $T\left(p\right)=Mp$ and $S\left(q\right)=Kq$, you get that
$S\left(T\left(p\right)\right)=K\left(Mp\right)=\left(KM\right)p$
So yes, either in applying transformations OR in multiplying matrices for transformations (at least when points are represented by column vectors), you write the matrix for the first operation to the left of the point; the matrix for th next operation to the left of that, and so on.
Foley and van Dam, in their Computer Graphics text (first edition), used ROW vectors for point-coordinates; in that situation, the matrices go on the right, and you can read operations/matrices from right to left, which seems nice. Unfortunately, if you do that, then operations on covectors (like the normal vector to a surface) end up reading left-to-right, so you don't really win. You also, in using row vectors, go against the conventions widely used in math courses, which just messes up your students. That's why in later editions (I confess I'm a co-author) we went with column vectors.