Using matrices for functions -- transformations and translation

Click For Summary

Homework Help Overview

The discussion revolves around the application of matrices to translate and transform functions, particularly quadratic functions like $$f(x)=x^2+4x$$. The original poster questions whether it is feasible to use matrices for such transformations, specifically in the context of changing the function to $$2f(x+4)$$.

Discussion Character

  • Exploratory, Conceptual clarification, Assumption checking

Approaches and Questions Raised

  • Participants explore the possibility of applying matrix operations to functions, questioning how matrices can represent transformations like translations and scaling. Some express confusion about the applicability of matrices to functions rather than vectors.

Discussion Status

Several participants have provided insights into the potential use of matrices for function transformations, with some suggesting that while direct application may be challenging, alternative approaches like using operators could be relevant. There is an ongoing exploration of different interpretations regarding the relationship between matrices and function transformations.

Contextual Notes

Participants note that there may be confusion regarding the distinction between applying transformations to functions versus vectors, and the implications of using projective coordinates for such transformations. The original poster's examples have led to varied interpretations of the problem's requirements.

Taylor_1989
Messages
400
Reaction score
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
Your question makes no sense to me.
 
edit: he want to use matrices ON A FUNCTION, to convert it to the second equation he posted.
 
Last edited:
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   Reactions: Logical Dog
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:
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.
 
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   Reactions: Taylor_1989
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:
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   Reactions: 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   Reactions: Taylor_1989

Similar threads

  • · Replies 25 ·
Replies
25
Views
3K
Replies
3
Views
2K
  • · Replies 69 ·
3
Replies
69
Views
11K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 14 ·
Replies
14
Views
2K
Replies
24
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K