# Graph reflections

1. Jun 20, 2009

### Mentallic

I know how to take the reflection of a graph in the $y=x$ line, or more formally, finding the inverse function. All I really do is switch the x and y variables in the function.

e.g. $y=x^2$, $x=y^2$

I tried taking the same idea and extending it to a reflection in the y=mx line, m constant. But I encountered problems as such:

Take the function $y=(x+1)^2$, reflect it in the line $y=2x$ or $x=y/2$

I tried using the same idea as before, so I substitute all x and y variables as such and this is the result:

$$y=(x+1)^2 : 2x=(y/2+1)^2$$

But when I graph both functions, it doesn't look correct. The new 'reflected' function looks much too fat/shallow.
Could someone please explain what I'm doing wrong. Where is my logic flawed here?

2. Jun 20, 2009

### tiny-tim

Hi Mentallic!

0 1
1 0

which is a reflection.

0 1/2
2 0

It leaves the line y = 2x invariant not because it is a reflection about that line, but because it is a reflection about y = x combined with a shear:

0 1
1 0

and

1/2 0
0 2

3. Jun 20, 2009

### Mentallic

Oh no, matrices. My worst enemy! I tried to learn them off the Massechusetts (spelling) videos on youtube, but failed miserably after a few lectures.

Is it possible to extend this explanation into another form other than matrices?

4. Jun 21, 2009

### tiny-tim

ah … this is your chance to get a better understanding of matrices.

First, can you see that

3 0
0 3

is an expansion (everything gets 3 times bigger)?

Second,

3 0
0 1

stretches in the x-direction only (leaving the y coordinates the same),

and likewise

1 0
0 2

stretches in the y-direction only (leaving the x coordinates the same).

Finally,

3 0
0 2

is a shear, which stretches 3 times in the x-direction but only 2 times in the y-direction, and

0 3
2 0

is a reflection in the x = y line, combined with a shear.

Does that make sense?

5. Jun 21, 2009

### Mentallic

Surprisingly, yes

But this is how I learnt (if you can even call it that) matrices:

Excuse me for not using latex, as I don't know how to create matrices...

[a c] [e]
[b d] [f]

Is equivalent to: ax+cy=e and bx+dy=f

Now, as for all the matrices you've shown, I don't know what they're supposed to mean when they don't have the second 'box' next to them.

i.e.

3 0
0 3

this is equivalent to 3x and 3y? It doesn't make sense to me when they're not expressed as functions.

6. Jun 21, 2009

### tiny-tim

I do know how to

but it takes so long I can't be bothered!
Nooo, that should be:

[a c] [x] = [e]
[b d] [y] = [f]
[3 0]
[0 3]

is (in algebra) a set of instructions,

and (in geometry) a transformation,

and it means that if you put a vector next to it:

[3 0] [2]
[0 3] [3]

then it converts that vector to another vector:

[3 0] [2] = [6]
[0 3] [3] = [9]

and similarly

[0 3]
[2 0]

is the rule that converts as follows:

[0 3] [2] = [9]
[2 0] [3] = [4]

So when you write a matrix on its own, it's a rule (like a computer program),

and you can put any "input" vector next to it, and get an "output" vector.

7. Jun 21, 2009

### Mentallic

omgosh :yuck:

Maybe I should go learn matrices for real this time... Be back in a bit after
i've acquired more knowledge on the topic

8. Jun 21, 2009

### Mentallic

In one last attempt, I tried reflecting $y=(x+1)^2$ in the line $y=4x$
This case is slightly different since the line now intersects the parabola at one point (1,4) and when I tried the same thing I did previously:

So I plotted $$4x=(\frac{y}{4}+1)^2$$ and this parabola intersected the the line at the same point, which is consistent with the features of other functions being reflected in the y=x line. I guess they don't look like the same because they have been sheared as you said tiny-tim

Still, I need to learn these matrices as they keep popping up in the most awkward places and catch me off-guard.