Step 1

Let \(\displaystyle{x}{<}{0}\)

Then we get,

\(\displaystyle{f{{\left({x}\right)}}}={x}^{{2}}\)

Let us consider two numbers \(\displaystyle{x}{<}{0}{\quad\text{and}\quad}{y}{<}{0}\).

Also let us assume,

\(\displaystyle{x}^{{2}}={y}^{{2}}\)

\(\displaystyle{x}^{{2}}-{y}^{{2}}={0}\)

(x + y)(x - y) = 0

(x + y) = 0, (x - y) = 0

x = -y, x = y

Therefore for two elements x and -x we have \(\displaystyle{f{{\left({x}\right)}}}={x}^{{2}}\), as well as \(\displaystyle{f{{\left(-{x}\right)}}}={\left(-{x}\right)}^{{2}}={x}^{{2}}={f{{\left({x}\right)}}}\).

Hence f is not one-to-one for \(\displaystyle{x}{<}{0}\).

Step 2

Let \(\displaystyle{x}\ge{0}\)

Then we get,

f(x) = x

Let us assume for two elements x and y both greater than or equal to zero, their images are same.

So we get,

f(x) = f(y)

x = y

So for \(\displaystyle{x}\ge{0},{y}\ge{0}\), f(x) = f(y) implies x = y.

Hence f is one-to-one function.