A question from life

Enlarge image
Aarav writes the rule x squared. Why does its invertibility depend on both domain and codomain?
Chapter 1: Relations and Functions

Aarav writes the rule x squared. Why does its invertibility depend on both domain and codomain?
A function that is both one-to-one and onto.
Review lesson not available yet.
Aarav writes the rule x squared. Why does its invertibility depend on both domain and codomain?
A function is one-to-one if equal outputs force equal inputs. It is onto if every codomain element is attained. A bijection has both properties.
Consider f from real numbers to real numbers with f(x)=x^2.
An inverse function from codomain back to domain exists for a bijection. Restricting the mathematical domain may make a rule one-to-one; merely hiding part of a graph in a viewing window does not change its domain.
Change only the codomain to nonnegative real numbers.
Onto means?
Restrict both domain and codomain to nonnegative reals.
Does hiding half a graph prove a domain restriction?
State domain and codomain before testing one-to-one or onto behaviour.