To say that the two functions are the same is only telling half the story. Functions are described as injections, surjections, and bijections, and which of these depends on the function's invertibility.
When we talk about injections, etc, we focus on the co-domain because, by default, all the elements of the domain are subject to the function.
An injection is where an element of the co-domain has at most one element of the domain mapped to it. Note that "at most one" includes none. That is, all the elements of the domain are mapped to only one element of the co-domain, but there may be elements of the co-domain that have no mapping with the domain.
A surjection is where an element of the co-domain has at least one element of the domain mapped to it. Note that "at least one" implies that all elements of the co-domain are mapped by the domain, hence the alternative word for this being "onto". So with a surjection all the elements of the domain are mapped to all the elements of the co-domain but more than one element of the domain could be mapped to the same element of the co-domain.
A bijection is both an injection and a surjection. Hence, the phrases "at most one" and "at least one" can only be combined into the phrase "one, and only one".
When it comes to invertibility, remember that a function's domain, by default, includes all the elements. Thus, because an injection may not map the domain to all of the co-domain, invertibility may need modification of the co-domain to become the domain of the inverse. On the other hand, a surjection includes all the elements of the co-domain so the inverse has this as the domain, but these elements may map to more than one element in its co-domain, the previous domain. So, the elements of the inverse's co-domain would map to at least one element (in fact only one) of its domain, and so would be a surjection. Of course, a bijection would be a one-to-one mapping with the inverse.
Hence, a surjection and bijection should be easily inverted whereas an injection would need modification of the function's co-domain to become the inverse's domain.
In the case of the two functions quoted, clearly they are both injections not sur or bijections.