Equality of functions

Since functions are defined to be sets, two functions are equal if they are the same set.

Proposition: If two functions \(F\) and \(G\) are equal, they have the same domain.

Proof: The set of \(a\) such that \((a,x)\in F\) is the domain of F. Since \(F=G\), we know that \((a,x)\in G\), so \(a\) is in the domain of \(G\). This proves that the domain of F is a subset of the domain of \(G\). But the same argument shows the opposite inclusion.

Proposition: If two functions are equal, then \(F\) and \(G\) have the same range.

Proof: Let \(x\) be in the range of \(F\). Then there exists an \(a\) in the domain of F so that \((a,x)\in F\). Since \(F=G\), we have \((a,x)\in G\), so \(x\) in the range of \(G\). This proves that the range of \(F\) is contained in the range of \(G\). The opposite argument is the same.

We’ve proved that if \(F=G\) then the domain and range of \(F\) and \(G\) are the same. The converse is false; there are lots of different functions with the same domain and range.

What is true is this:

Proposition: If \(F\) and \(G\) are functions with the same domain, then \(F=G\) if and only if \(F(x)=G(x)\) for all \(x\) in that domain.