What Are Functions?
What is y = 3x - 2? An equation? Or maybe a function? Could it possibly be both? Keep on reading to learn all about functions and to find out how they're different from equations.
Page 2 of 2
What Is a Function?
Here's what I mean: Instead of writing our two-variable equation as y = 3x - 2, let’s instead write this: y(x) = 3x - 2. What is this? It’s a function. What's that?
Well, the fact that we’ve changed y into y(x) means that we’re now thinking of y as what’s called a function instead of a variable. In soft, squishy, non-rigorous mathematical language, you can think of this function, y, as a sort of machine that takes some input and in return gives you back a single unique piece of output. The input to the function is the variable x, which is why it appears in parenthesis after the name of the function. Here’s how it works:
On the left, you see a number of different values of the input variable, x. In this case we’re feeding positive integers into our function. And the function that we’re plugging these x values into is y(x) = x2. In other words, it's the function that squares numbers. So this function—like all functions—takes some input, does some calculation with it, and then spits out the result.
Functions vs. Equations
If you’re still a bit unclear about the difference between an equation and a function, here’s another way for you to think about it:
- An equation is something that's used to balance the "stuff" on either side of an equals sign.
- A function is something that's fed input and in return gives output based upon a relationship.
Importantly, when it comes to describing what a function is and does, you'll notice that we haven’t said a word about testing for equality. So although they might look similar—or indeed identical if, as is often the case, the function is written without its accompanying input variable in parenthesis—functions and equations really are quite different creatures.
What Makes a Function a Function?
But lest we get ahead of ourselves and start calling everything in sight a function, it's extremely important to know that not every object that's fed input and gives back output based upon some relationship is a function. And that's because a function is only a function if two critical things are true:
- Functions must be able to provide output for every allowable input value.
- Functions cannot have more than one output value for each of these input values.
We'll talk more about what all of this means next week, and we'll talk about it in a more mathematical way. But for now the key thing you should understand is that something like y = x2 can be either:
- A good old-fashioned equation that checks whether or not its two sides are balanced.
- A function—more clearly written y(x) = x2—which returns a single value for each possible input.
But, as I said before, when it comes to functions, there's a lot more to say. So be sure to check back next time for the rest of the story.
Okay, that's all the math we have time for today.
Please be sure to check out my book The Math Dude’s Quick and Dirty Guide to Algebra. And remember to become a fan of the Math Dude on Facebook where you’ll find lots of great math posted throughout the week. If you’re on Twitter, please follow me there, too.
Until next time, this is Jason Marshall with The Math Dude’s Quick and Dirty Tips to Make Math Easier. Thanks for reading, math fans!
Equation image courtesy of Shutterstock.
Betterment LLC is an SEC Registered Investment Advisor. Brokerage services are offered by Betterment Securities, an SEC registered broker-dealer and member FINRA/SIPC. Investments are not FDIC Insured. No Bank Guarantee. May Lose Value. Investing in securities involves risks, and there is always the potential of losing money when you invest in securities. Before investing, consider your investment objectives and Betterment's charges and expenses. Not an offer, solicitation of an offer, or advice to buy or sell securities in jurisdictions where Betterment and Betterment Securities are not registered.