and the range the solution gave was:

im having trouble figuring out how the range is obtained. i couldn't picture it and i need some explanation on how a range is obtained of a function given.
and the range the solution gave was:

im having trouble figuring out how the range is obtained. i couldn't picture it and i need some explanation on how a range is obtained of a function given.
$\begin{align*} t(\mathbb{Z}) &= t(\mathbb{Z}_{<0} \cup \mathbb{Z}_{\geq0}) \\ &= t(\mathbb{Z}_{<0}) \cup t(\mathbb{Z}_{\geq0}) \\ &= \{x^2|x\in\mathbb{Z}_{<0}\}\times\{-1\} \cup \{x^2|x\in\mathbb{Z}_{\geq0}\}\times\{1\} \\ &= \{x^2|x\in\mathbb{Z}_{>0}\}\times\{-1\} \cup \{(0,1)\} \cup \{x^2|x\in\mathbb{Z}_{>0}\}\times\{1\} \\ &= \{(0,1)\} \cup \{x^2|x\in\mathbb{Z}_{>0}\}\times\{-1,1\} \end{align*}$
The range can also be written as the union of three disjoint sets: $$\{(0,1)\}\cup(S \times \{1\})\cup (S\times \{-1\})$$ where $S=\{1^2,2^2,3^2,4^2,\dots\}$ is the set of positive perfect squares. Can you picture it now?
Range can mean codomain or image. Here I take it as the image.
You may first write down some elements of $A=\{(0,1)\}\cup(\{x^2:x\in\mathbb{Z},x\ge1\}\times\{-1,1\})$ and check whether it is in the range.
$(0,1)=t(0)$
$(1,1)=t(1)$
$(1,-1)=t(-1)$
$(4,1)=t(2)$
$(4,-1)=t(-2)$
To show that it is the range, you should check whether
(1) if $x\in\mathbb{Z}$, then $t(x)\in A$
(2) if $y\in A$, then there exists an $x\in\mathbb{Z}$ such that $t(x)=y$.
$$t(0)=(0,1)$$
If $x \geq 1$, then $$t(x)=(x^2,1)$$ $$t(-x)=((-x)^2,-1)=(x^2,-1)$$
We have considered every single integers.
Hence in summary:
The range is $$\{(0,1)\}\cup \{ (x^2,1): x\in \mathbb{Z}, x\geq 1\} \cup\{ (x^2,-1): x\in \mathbb{Z}, x\geq 1\}$$
which can also be written as
$$\{ (0,1)\}\cup \left( \{x^2: x\in \mathbb{Z}, x\geq 1\} \times \{-1,1\}\right)$$