Using matrices for functions -- transformations and translation

That is, we want ##y_b = \frac{1}{2} y_a##. That is, we want the line ##y_b = 1## to correspond to the line ##y_a = 2##. That is, we want the line ##y_a = 2## to be the ##y_b = 1## line in the new coordinate system. That is, we want ##y_a = 2## to be the ##y_b = 1## line in the new coordinate system. That is, we want ##y_a = 2## to be the ##y_b = 1## line in the new coordinate system. That
  • #1
Taylor_1989
402
14

Homework Statement


Happy new year all. I was wondering if you can use matrices to translate and transform a function? So for example if I were to take the function $$f(x)=x^2+4x$$ and I want to the translate and transform the equation to $$2f(x+4)$$. Can this be done by matrices.

I know how to use matrices to solve simultaneous equations ect. which is what got me thinking down this route. Could someone point me in the right direction, or link some website that might help me.

Thanks in advance.

Homework Equations


N/A

The Attempt at a Solution


N/A
 
Physics news on Phys.org
  • #2
Your question makes no sense to me.
 
  • #3
edit: he want to use matrices ON A FUNCTION, to convert it to the second equation he posted.
 
Last edited:
  • #4
Bipolar Demon said:
can a function that op has provided be turned into a matrix that reflects the algebraic equivalent of that function.

That question makes no sense to me either!
 
  • Like
Likes Logical Dog
  • #5
PeroK said:
That question makes no sense to me either!

he wants to

1. use matrices or matrix operations or anything related to matrices, ON a function in order to
2. Make the end result be the second equation he posted in op

is this possible? sorry for confusion. I am also lost, I have studied matrixes but never heard of it any of it being applied on aof quadratic function.

@PeroK
 
Last edited:
  • #6
Sorry for the confusion. It was just a thought. I just used a quadratic as an example. So a aother would be this:

$$f(x)=x^2$$

$$f(x)+3=x^2+3$$

So if I where to draw it, I would start with the x^2 and move it 3units to the left in the negative x-direction. I was just wondering if you can use matrices to do the same thing.
 
  • #7
Taylor_1989 said:
Sorry for the confusion. It was just a thought. I just used a quadratic as an example. So a aother would be this:

$$f(x)=x^2$$

$$f(x)+3=x^2+3$$

So if I where to draw it, I would start with the x^2 and move it 3units to the left in the negative x-direction.
No, that isn't right. To get the graph of y = f(x) + 3, translate the graph of y = f(x) upward by 3 units.
To get the graph of y = f(x + 3), translate the graph of y = f(x) left by 3 units. Maybe that's what you were thinking.
Taylor_1989 said:
I was just wondering if you can use matrices to do the same thing.
I don't think so. A matrix operates on vectors, not functions.
 
  • Like
Likes Taylor_1989
  • #8
Taylor_1989 said:
Sorry for the confusion. It was just a thought. I just used a quadratic as an example. So a aother would be this:

$$f(x)=x^2$$

$$f(x)+3=x^2+3$$

So if I where to draw it, I would start with the x^2 and move it 3units to the left in the negative x-direction. I was just wondering if you can use matrices to do the same thing.
It would move on +ve y-axis by not on -ve x-axis.

if we represent your function as a vector ##\vec{a} (x) =\begin{bmatrix}x \\ x^2 \\1\end{bmatrix}##
Then I think we will use
$$A = \begin{bmatrix}
1 & 0 & 0\\
0 & 1 &3 \\
0&0 & 1
\end{bmatrix}$$
To translate the points.
Then new points we will be
$$\vec a^{\prime}(x)= A \times \vec a =
\begin{bmatrix}
x \\
x^2 + 3 \\
1
\end{bmatrix}$$
 
Last edited:
  • #9
Sorry I miss the bracket.
 
  • #10
@Buffu That what I am trying now. But I think I am confusing myself with applying the translation part. I will post my working in a bit. The part I am getting stuck with is applying the translations in the vector form.
 
  • #11
Taylor_1989 said:
@Buffu That what I am trying now. But I think I am confusing myself with applying the translation part. I will post my working in a bit. The part I am getting stuck with is applying the translations in the vector form.
check my edit.
Are you doing this for a computer graphics project ?
I think you are probably confusing between column-wise and row-wise matrix.
 
  • #12
No, no project it was just a thought I had. I just was wondering if its possible. Ah, I have just seen your post, that did not appear on my phone before. I see where you coming from.
 
  • #13
Taylor_1989 said:

Homework Statement


Happy new year all. I was wondering if you can use matrices to translate and transform a function? So for example if I were to take the function $$f(x)=x^2+4x$$ and I want to the translate and transform the equation to $$2f(x+4)$$. Can this be done by matrices.

I know how to use matrices to solve simultaneous equations ect. which is what got me thinking down this route. Could someone point me in the right direction, or link some website that might help me.

Thanks in advance.

Homework Equations


N/A

The Attempt at a Solution


N/A

This cannot really be done well using matrices, but it can be done using operators (which are like ##\infty \times \infty## matrices!) So, we can write
$$2 f(x+4) = 2 e^{4D} f(x),$$
where
$$D = \frac{d}{dx}$$
is the "differentiation" operator.

The exponential of ##D## is defined as an infinite series: for constant ##a##,
$$e^{aD} = 1 + aD + \frac{a^2}{2!} D^2 + \frac{a^3}{3!} D^3 + \cdots .$$
However, when applied to a quadratic function ##f(x)## we have ##D^3 f = D^4 f = \cdots = 0##, so we get a finite expression
$$2 f(x+3) = 2 \left( f(x) + 4 Df(x) + \frac{4^2}{2!} D^2 f(x) \right) .$$
 
  • Like
Likes Taylor_1989
  • #14
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.
 
  • Like
Likes Taylor_1989

Related to Using matrices for functions -- transformations and translation

1. What are matrices and how are they used in functions?

Matrices are rectangular arrays of numbers or symbols, typically used for performing calculations in mathematics. In the context of functions, matrices are used to represent transformations and translations of geometric shapes on a coordinate plane. This allows us to easily manipulate and analyze the behavior of functions.

2. How do matrices represent transformations?

Matrices represent transformations by using a combination of scaling, rotation, and reflection operations on a given shape. Each number in the matrix corresponds to a specific operation, and when multiplied with the coordinates of a point in the shape, it results in the new coordinates of the transformed point.

3. What is the difference between a transformation and a translation?

A transformation is a general term for any change in the position, size, or shape of a geometric object. A translation, on the other hand, is a specific type of transformation that moves an object without changing its size or shape. It is represented by a horizontal and vertical shift of the object's coordinates.

4. How can matrices be used to solve real-world problems?

Matrices can be used to solve real-world problems by representing the problem as a system of linear equations and using matrix operations to find the solution. They can also be used in computer graphics and engineering to model and simulate real-world scenarios.

5. Are there any limitations to using matrices for functions?

While matrices are a powerful tool for analyzing and manipulating functions, they can only be used for functions that are linear or can be approximated as linear. Non-linear functions, such as curves, cannot be accurately represented using matrices. Additionally, the size and complexity of matrices can become challenging to manage in more advanced functions.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
25
Views
1K
  • Precalculus Mathematics Homework Help
2
Replies
69
Views
4K
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
  • Precalculus Mathematics Homework Help
Replies
12
Views
3K
  • Precalculus Mathematics Homework Help
Replies
24
Views
2K
  • Precalculus Mathematics Homework Help
Replies
4
Views
1K
  • Precalculus Mathematics Homework Help
Replies
7
Views
2K
  • Linear and Abstract Algebra
Replies
8
Views
1K
  • Precalculus Mathematics Homework Help
Replies
1
Views
2K
Back
Top