15

What is the precise difference between function and equation ? In which case will it be wrong if used( common mistakes )? Also will the Venn diagram overlap if I were to draw one ? Any help and discussions will be appreciated .

Servaes
  • 63,261
  • 7
  • 75
  • 163

4 Answers4

22

A function is a transformation or mapping of one thing into another thing. It might be written as a rule (e.g. "Take the input and square it"), as a formula ("e.g. $f(x) = x^2$ or $x \mapsto x^2$), as a set of ordered pairs (e.g. $\left\{(1, 1), (2, 4), (3, 9), \ldots\right\}$, or any other way of showing how the output relates to the input. The function doesn't have to use numbers, either - a function could take two words and return their letters interlaced (so f(cat, dog) = cdaotg) or it could tell you what day of the week a given date falls on, or the post code/zip code of a given geographical location.

[In very formal terms, a function is a set of input-output pairs that follows a few particular rules.]

An equation is a declaration that two things are equal to each other. For example, $2^2 = 4$ is an equation stating that the square of 2 is 4. An equation may include variables of unknown value, and it may be true for all, some or none of the possible values of those variables. For example, $x^2 = 4$ is an equation that is true when $x = \pm 2$, and false for other values of $x$, while $x^2 = -4$ is an equation that is false for all real values of $x$.

What may be confusing you is that we often use equations to declare a relationship between two variables, often in the form of a function or formula. For example, $y = x^2$ is an equation stating that the value of $y$ is determined by the value of $x$ via the function $x^2$.

ConMan
  • 24,300
  • Very well explained. Thanks . – Abu Bardewa Jan 08 '16 at 07:45
  • 1
    A function means that every point in the domain for which the function is defined only has 1 image. – Algebear Apr 30 '18 at 23:44
  • @ConMan Even though we still use an equation to determine the output value of the function we don't mean to solve the equation right? If we have for example the function $f(x)=4$ no one will think to "solve" it. They will just map every $x$ to $4$ whereas if it was just an expression of equality ($y=4$) then the solution would be $4$. – user599310 Sep 07 '20 at 21:50
  • Correct.$f(x) = 4$ doesn't even really have a "solution" as such, since there's nothing to solve for (and if you're solving for "for which $x$ does $f(x) = 4$?" then the answer is "all of them"). – ConMan Sep 07 '20 at 22:50
  • One thing to note is that not all equations of two variables define a function. For example, $y=x^y$ does not define a function from to because it fails the vertical line test (i.e. there are some values of that have $2$ images). For example, =1.3 has two corresponding -values that satisfy $y=1.3^y$ (see [graph] (https://www.desmos.com/calculator/2jlwcf7sfn)). $y=x^y$ does seem to define a function from to though as it doesn't fail the horizontal line test. – joseville Nov 16 '21 at 18:19
  • (Continued) So that was an example of an equation of two variables that defines a function in one direction, but not the other; but, we can also have equations of two variables that do not define a function in either direction such as $x^2 + y^2 = 1$ which defines a functions neither from to nor from to because the "1 image" rule is violated in both cases (i.e. it fails both the vertical line test and the horizontal line test). – joseville Nov 16 '21 at 18:20
1

I think we also tend to muddy the semantic waters when we insist on referring to $f(x) = x^2$ (for instance) as a function. It's not: It's an equation. The function in this case is given by the expression $x^2$, so in that way we can say that expressions are functions. In this example, $f$ is the name of the function, $x$ is the input of the function,and $x^2$ is the expression which is the output, i.e., the function $f(x)$ itself.

  • 1
    This is not how it works. Do you know the strict definition of a function? – Algebear Apr 30 '18 at 23:42
  • You gave an example that "sin(x) is a function". sin(x) is an expression.

    It seems to me that you're interested in flexing technical muscles instead of having a constructive conversation. I'm not interested in that.

    – Paul Hartzer May 02 '18 at 01:48
  • No, it was not my intention to be understood as someone who likes to "flex technical muscles". I just like to point out to people how things are formally defined. If you're new here you should understand eventually that critic on others' work is the best way to learn from each other. – Algebear May 02 '18 at 12:25
1

It might be useful to introduce the term formula at this point.

Functions have arguments, i.e., values to be input into a formula. Equations do not have arguments to be input into a formula.

0

A function $f(x):D\to C$ must satisfy $\forall x\in C \ \text{where f is defined in this point $x$},\ \exists!\ f(x)\in D$; i.e. every point in the domain of $f$ for which $f$ is still defined may have only one image, which is a point on the line (a point in the codomain). Not to confuse with surjectivity. For example, $f:\mathbb{R}\to\mathbb{R}$ with $f(x)=\sin(x)$ is non-surjective for there is no $x\in \mathbb{R}$ such that $f(x)=2$. But the $\sin(x)$ is a function because there's no $x$-value with a multiple $f(x)$-value.
An equation can be every equalty: a function is an equality, a differential equation is an equality.
E.g. $x=y^2$ is an equation, but not a function if we view it with x in the domain and y in the codomain. For instance, $x=1$ has $y=1$ and $y=-1$ as solution (point in domain with two different images). Hence, not a function in the $(x,y)$-plane.

Algebear
  • 1,674
  • re: "$\forall x \in C$", $x$ should be in the domain $D$, not the codomain $C$, right? i.e. it should be "$\forall x \in D$" – joseville Nov 16 '21 at 18:10
  • Upvoted, but followup question, if you're using this notation: "():→"; shouldn't it be ":→"? Likewise, "$sin(x)$ is a function" should be "$sin$ is a function". I'm using the following answer as a reference. – joseville Nov 16 '21 at 18:16