Question:
List all the elements of each of the sets given below.
$E=\left\{x: x \in Z\right.$ and $\left.x^{2}=x\right\}$
Solution:
Given: $x \in Z$ and $x^{2}=x$
Z is a set of integers
Integers are …-2 , -1, 0, 1, 2, …
Now, if we take x = -2 then we have to check that it satisfies the given condition x2 = x
$(-2)^{2}=4 \neq 2$
So, $-2 \notin E$
If $x=-1$ then $(-1)^{2}=1 \neq-1$ [not satisfying $\left.x^{2}=x\right]$
So, $-1 \notin E$
If $x=0$ then $(0)^{2}=0$ [satisfying $\left.x^{2}=x\right]$
$\therefore 0 \in \mathrm{E}$
If $x=1$ then $(1)^{2}=1$ [satisfying $\left.x^{2}=x\right]$
$\therefore 1 \in E$
If $x=2$ then $(2)^{2}=4 \neq 2$ [not satisfying $\left.x^{2}=x\right]$
$\Rightarrow 2 \notin E$
So, $E=\{0,1\}$