# Mappings, domains, codomains, proof of linearity

1. Oct 21, 2009

### Mysteek

1. The problem statement, all variables and given/known data

For the following mappings, state the domain and the codomain. Determine whether the mapping is linear by using the definition of linearity: either prove it is linear or give a counterexample to show why it cannot be linear.

i.) f(x1,x2,x3)=(2x2, x1−x3)
ii.) g(x1, x2) = (cos x2, x1x2^3)
iii.) h(x1, x2, x3) = (0, 0, x1 + x2 + x3)

I don't know how to see or interpret this notation. I've looked through my notes and can't seem to find anything that even remotely resembles this type of problem. Because I cannot understand the question, I'm having a hard time at even an attempt for a solution.

2. The attempt at a solution

Looking at just i. right now:

I would like to say the domain is R^3 since there are three columns on the left side... I don't really know if that is how to find the domain. Is the question kind of saying something like... f(x,y,z) = 2y, x-z ?

I do know, however, that if g(a,b,) = (ga,gb), and g(k(a,b)) = kg(a,b), then that is proof of linearity. But reading this notation, it feels way too abstract for me to wrap my head around. Any help would be greatly appreciated, thank you.

Last edited: Oct 21, 2009
2. Oct 21, 2009

### Staff: Mentor

The notation you used is also very difficult to interpret. My guess is that how it appeared in your homework or text book was like this:

i.) f(x1,x2,x3)=(2x2, x1 − x3)
ii.) g(x1, x2) = (cos x2, x1x32) - Note: this can't be right. Only x1 and x2 can appear on the right side.
iii.) h(x1, x2, x3) = (0, 0, x1 + x2 + x3)
For example, if I have interpreted what you wrote correctly,
f(1, 2, 3) = (2*2, 1 - 3) = (4, -2)
h(2, 4, 6) = (0, 0, 2 + 4 + 6) = (0, 0, 12)

3. Oct 21, 2009

### Mysteek

Crap, I'm really sorry, I completely messed up part ii.

ii was supposed to say g(x1, x2) = (cos x2, x1x2^3) It's hard to see, but what the right side says is cosine of xsubscript2, xsubscript1xsubscript 2, to the exponent 3.

Thanks for your example! Based on that, I'm guessing that I can do the following:

i.) f(x1,x2,x3)=(2x2, x1 − x3)
= (2x2, x1 − x3)

Then to show that it is linear:

k(2x2, x1 − x3) = (k2x2, kx1 − kx3)

Would I substitute in any three values for x to see if they are equal?

4. Oct 21, 2009

### Staff: Mentor

For linearity I think you want to show that f(kx) = kf(x), where x represents either (x1, x2, x3) or (x1, x2), depending on which function you're working with.

These functions can be thought of as taking vectors as input, and producing other vectors as output.

This equation has to hold no matter the choice for x1, x2, and, as appropriate, x3.

BTW, if you click on the Go Advanced button below the text entry box, it causes a menu bar to appear. You can make exponents look like they should and can make subscripts look like they should. The two menu buttons look like X2 (for superscripts) and X2 (for subscripts).

5. Oct 22, 2009

### Mysteek

Ah thank you. I'm still reaally confused and it's making me so frustrated. I've been working at the same question for 5 hours.. but at least I can give you guys a better picture of where I'm at now. So you're saying that I should be able to show f(kx) = kf(x), if it is linear.

I've learned that the domain of these are Rn, where n is the number of columns in the original. The codomain is Rm, where m is the number of columns in the mapped function? If anyone could verify that'd be great.

Here's my attempt again:

f(x1, x2, x3)=(2x2, x1 − x3)

Domain: R3
Codomain: R1 ?

And showing linearity:

Let k = 2 (?)

f(k(x1, x2, x3) (am I even supposed to use this part?)
= k(2x2, x1 - x3) (how does this part even fit into the first part?)
= 2(2x2, x1 - x3)
= (4x2, 2x1 - 2x3)

Ugh, I'm so frustrated.. I don't know how I'm even trying to prove that f(kx) = kf(x)

I guessed I just showed f(kx), but how am I supposed to show that it equals kf(x)?

EDIT: I think I get it!

Okay so from my example, k = 2 so

(2(x1, x2, x3) = 2(2x2, x1 - x3)
(2x1, 2x2, 2x3)= (4x2, 2x1 - 2x3)

Therefore they are not equal and it is not linear?

Last edited: Oct 22, 2009
6. Oct 22, 2009

### Staff: Mentor

Can't be R1 since there are two coordinates.
You can't specify k. What you're trying to show has to hold for all real values of k.
So f(k(x1, kx2, x3) = f((kx1, kx2, kx3) (since scalar multiplication of a vector multiplies each component by the scalar)
= (2kx2, kx1 - kx3)
= ?
You lost track of what you were trying to prove, which was that f(2x) = 2f(x). Again, you need to do this with an arbitrary constant k, not a specific number, but here's what you should have said.

f(2x) = f(2(x1, x2, x3)) = f((2x1, 2x2, 2x3))
= (2*2x2, 2x1 - 2x3)
= (4x2, 2x1 - 2x3)
= 2*(2x2, x1 - x3)
= 2f(x)

So f(2x) = 2f(x). If you can show the same thing with k, you will have shown that f is linear.

7. Oct 22, 2009

### Mysteek

I see.

So a few notes to keep in mind:

Domain -> Columns of original function
Codomain -> Columns of mapped (if I'm even using the right terminology)

So would ii be:

g(x1, x2) = (cos x2, x1x23)

Domain: R2
Codomain: R2

And
g(k(x1, x2))
= g(kx1, kx2)
= (cos kx2, kx1x23) (Am I supposed to sub kx2 for the x2 in the mapped function?)

So because I wasn't able to isolate k, ii isn't linear? This still isn't making sense to me because I'm convincing myself that all functions are linear.

Last edited: Oct 22, 2009
8. Oct 22, 2009

### Staff: Mentor

Well, sort of. The domain is the space from which your inputs come. For a function f(x1, x2, x3), the domain would be R3. The codomain is the space that contains the images of the inputs. If the output of the function has two coordinates, the domain would be R2. The image or range of the function is a (sometimes proper) subset of the codomain.
Yes.
Yes, you need to. You should get (cos kx2, kx1*(kx2)3)
You made a mistake, but even so, the function isn't linear.
Whether you know it or not, you are making progress. For one thing, you're starting to recognize that some functions aren't linear. A linear function, in the sense that linear is used here will multiply input coordinates by a constant, add or subtract coordinates, or add together constant multiples of coordinates. In contrast, a function that squares, cubes, takes the square root or cube root, etc. of input coordinates is NOT linear. My list of nonlinear functions is not exhaustive.

9. Oct 22, 2009

### Mysteek

Darn.. I feel sooo lost but I'm starting to have an idea of what is happening

I'll start here again:
(cos kx2, kx1*(kx2)3) is the end point, because from here I cannot isolate k to prove the definition of linearity.

So to show a counter example, can I just substitute in any number other than 1 for K? And then do I also sub in any numbers for x?

I also read something in my textbook that stated that for a function to be linear it must pass two tests:

f(x+y) = f(x) + f(y)

AND

f(Kx) = KL(x)

So does this suggest that it's possible that functions can pass one test and fail the other? To be further correct, do I need to substitute in x+y into the mapped function?

10. Oct 23, 2009

### Staff: Mentor

You can continue one more step by showing that (cos kx2, kx1*(kx2)3) $\neq$ k(cos x2, x1*x23), which implies that f(kx) $\neq$ kf(x).
Yes, if the equation doesn't hold for a specific value of k, that's a valid counterexample. I don't think you would need to substitute numbers for x, though.
On the right it should be Kf(x).
Yes and yes. For your second question, don't forget that x and y are vectors.

11. Oct 28, 2009

### Mysteek

Thank you. Question has been solved =] You were a great help.

Edit: Crap, it won't let me edit the title or first post to say that it's been solved. :(