In this exercise, you are going to build matrices that perform the following transformations in 2-D space:
While building the transformation matrices, It's helpful to think about where the basis vectors should land under that transformation.
You must define four variables called A
, B
, C
, D
and E
. A transformation matrix must be assigned to each of the variables, so that:
A
must flip a vector verticallyB
must flip a vector horizontallyC
must rotate a vector 90 degrees clockwiseD
must rotate a vector 90 degrees counterclockwiseE
must stretch a vector by a factor of 2 horizontally and flip it verticallyAs an example, here is a matrix F
which flips both a vector both horizontally and vertically.
F = [[-1,0], [0, -1]]