Is a one to one function also a total function

1.2k Views Asked by At

One of the lines in my lecture slides for theory of Computation states that

A is equipotent to B (|A|=|B|) if there is bijection f: A->B

Which means that f is both one to one and onto. Since f is onto, it implies that the range(f) = B. So my question is that if a function is one to one, does it always mean that it's a total function i-e dom(f) = A ? If not, then plz give an example. Because if that is not the case then the aforementioned line cannot be sufficient to prove that A and B have the same cardinality.