Why is the composition also a function

37 Views Asked by At

I was working on the following task:

Let $f: N \rightarrow P$ and $g: M \rightarrow N $ be functions.

Definition of a function: In mathematics, a function from a set X to a set Y assigns to each element of X exactly one element of Y:

$∀x \in X \quad ∃!y \in Y: (x,y) \in f$

Now I have to prove that $(f ◦ g)(x) : M \rightarrow P $ with $(f ◦ g)(x) = f(g(x))$ is also a function.

Now I am working for hours on this task and still didn't solve it.

2

There are 2 best solutions below

0
On

$g$ gives a unique value $g(x)\in N$ at $x\in M$, and at $g(x)\in N$ there is a unique value assigned to $f(g(x))\in P$. With the double uniqueness, we know that the assignment of $f(g(x))\in P$ is unique for each $x$.

1
On

Because if you take m from M, then g(m) = n for some n in N

Then f(n) = p for some p in P

So f(g(m)) = f(n) = p

Ie if you take any m in M, the composite function will give you a p in P since

(fg)(m) = f(g(m)) = f(n) = p.

This clearly meets the definition of a function you were given