Sign in to follow this  

1 to 1 test for functions

This topic is 3739 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there a quick mathematical test for checking whether a function is 1 to 1? I'm going through one of my old calculus books, and in the first chapter I came across inverse functions. Anyway, the suggestion in the text is to use a horizontal line test to figure out whether a function is 1 to 1. ie.) f(x) = x^2 is not one to one because there are two x values for each y value. ie.) f(x) = 2x - 3 is one to one because there is a different result for every input. Anyways being a programmer, I don't really like the idea of having to do a visual check for something like that. I don't want to cycle through all the numbers in the entire domain to find out if it is 1:1. An example being done where the result is that the function is not 1 to 1 would be most helpful. I know this sounds like homework, but I'm not in school and it's really just for my own knowledge.

Share this post


Link to post
Share on other sites
Well, another way of testing to see if a function is one to one is to check if f(a) == f(b) implies a == b.

So for x2:

a2 = b2
a = ±b

x2 is not one to one.

For 2x - 3:

2a - 3 = 2b - 3
2a = 2b
a = b

2x - 3 is one to one.

Share this post


Link to post
Share on other sites
Thanks for your help. I really appreciate it.

I saw this in the book too. But, I still don't understand how it can be tested for?

I do see the relationship here and I understand that a squared value could have been either negative or positive originally. My main thought, is that I don't see how I could change that formula into an algorithm (where most of the time I do).

Unless... is the main point here that the definition of a squared value could have been originally + or -? (Meaning that the algorithm would be related in some way to a test of the degree of the polynomial) And if that's the case, how does the given formula help solve the problem?

Anyways, thanks again for the help.

Share this post


Link to post
Share on other sites
Symbolic mathematics is a tricky thing to program. It's what software packages like Maple and Mathematica do. Automatically generating proofs is harder still. If your functions have some fixed form and you know how to determine if functions of that form are one-to-one, then it probably isn't difficult to write a program to implement the algorithm. As you try handling more cases it becomes more difficult.

If all your functions are polynomials then the algorithm is fairly simple (just detect minima and maxima). As the functions become more complicated, automatically finding the derivatives becomes more difficult, but it can still be completely automated without too much trouble as long as you're dealing with nicely behaved functions. Solving for the roots of the derivatives is another tricky problem, as is solving for roots in general. Numeric methods for solving them can be badly behaved, and symbolic methods are once again a tricky thing to implement.

If the domain is finite then you can exhaustively scan the entire domain.

Share this post


Link to post
Share on other sites

This topic is 3739 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this