] >
S and T and finite.
If f is surjective, each y∈T has a preimage x. But if two x and x′ has the same image, it means that |S|<|T|, that is impossible because |S|=|T|. So, each x∈S has a unique image y∈T and f is bijective.
If f is injective, ix x≠x′, y=f(x)≠y′=f(y′). |S|=|T| so there is no y″ in T that has no preimage in S and f is bijective.
Note that both of the implications are false if S and T are infinite. Consider in ℕ f:n↦n+1. This function is injective but not surjective, therefore not bijective. Its converse g:n↦n−1 (with g(0)=0) is surjective but not injective, therefore not bijective too.