Taylor_1989 said:
I was wondering if you can use matrices to translate and transform a function?
Yes you can. The simplest way to think about it is that we express the same graph in a new coordinate system.
The transformation ##\begin{pmatrix} x_b \\ y_b \end{pmatrix} = \begin{pmatrix} a_{1,1}&a_{1,2}\\ a_{2,1}&a_{2,2}\end{pmatrix} \begin{pmatrix} x_a \\ y_a \end{pmatrix}## where that ##a_{i,j}## are constants defines a "linear transformation" from the ##(x_a,x_b)## coordinate system to the ##(x_b,y_b)## coordinate system.
We can do a transformation involving the translation of coordinates by using "projective coordinates". In projective coordinates we represent the point ##(x,y)## in 2D as ##\begin{pmatrix} x\\y\\1\end{pmatrix}##.
A transformation in projective coordinates is
##\begin{pmatrix} x_b \\ y_b \\1 \end{pmatrix} = \begin{pmatrix} a_{1,1}&a_{1,2}&a_{1,3}\\ a_{2,1}&a_{2,2}&a_{2,3} \\0&0&1\end{pmatrix} \begin{pmatrix} x_a \\ y_a \\ 1\end{pmatrix}##
Suppose we wish the new coordinate system to have its origin ##(x_b = 0, y_b= 0) ## at (##x_a = 4, y_a = 0)## and we want the scale on the ##y_b## axis to be half that of the ##y_a## axis, so that ##y_a = 1## and ##y_b = 2## represent the same distance. A transformation that accomplishes that is:
##\begin{pmatrix} x_b \\ y_b \\1 \end{pmatrix} = \begin{pmatrix} 1 & 0 & -4\\ 0 & 2& 0 \\0&0&1\end{pmatrix} \begin{pmatrix} x_a \\ y_a \\ 1\end{pmatrix}##
So:
## x_b = x_a - 4## thus ## x_a = x_b + 4##
## y_b = 2 y_a## thus ## y_a = (1/2) y_b##
The graph of ## y_a = f_a(x_a) = x_a^2 + 4 x_a ## is transformed to the new coordinates by substituting ##x_a = x_b + 4, y_a = (1/2)y_b## which gives:
##(1/2)y_b = (x_b + 4)^2 + 4(x_b + 4)##
## y_b = f_b(x_b) = 2 ( ( x_b^2 +8 x_b + 16) + 4x_b + 16) = 2x_b^2 + 24 x_b + 64##
There is a close relationship between "changing coordinates and keeping the same graph" and "changing the graph and keeping the same coordinate system". Suppose we pretend the function we have written in ##(x_b,y_b)## coordinates is actually a function expressed in the original ##(x_a,y_a)## coordinates. Then we have tranformed the function ## y_a = f_a(x_a)= x_a^2 + 4 x_a ## to a new function ##y_a = g_a(x_a) = 2 x_a^2 + 24 x_a + 64## and kept the coordinate system the same.
This close relationship is useful, but it usually causes me some confusion because linear transformations back and forth between two coordinate systems involve a matrix ##A## and its inverse ##A^{-1}## and in a given problem its easy to forget which "direction" of transforming coordinates corresponds to which of ##A## and ##A^{-1}## and there is also the problem of whether we are keeping the same graph and transforming the coordinates to new coordinates or whether we are keeping the same coordinates and transforming the graph to a new graph.
A line perpendicular to the x-axis of an cartesian (x,y) coordinate system must not intersect he graph of a function in more than one point. A transformation that rotates the coordinate systems (or rotates the graph in the same coordinates) may transform the graph of a function to a graph that is not the graph of a function. You can look up the topic of "rotation matrices" to find examples of transformations that rotate coordinates.