# Interpretation of the notation $x = (x_1,x_2)\in \{0,1\}^2$?

I have a few questions regarding the following notation:

$$x = (x_1,x_2)\in \{0,1\}^2$$

Question 1:

Is the following correct?

$$\{0,1\}^2$$ is the Cartesian product of the 2 sets $$\{0,1\}$$ and $$\{0,1\}$$, i.e. \begin{align} \{0,1\}^2 &= \{0,1\} \times \{0,1\} \\ &= \{(0,0),(0,1),(1,0),(1,1)\} \end{align}

Question 2:

With the notation we mean $$(x_1,x_2)$$ is an element of the set $$\{0,1\}^2$$, so we can write:

$$(x_1,x_2)\in \{(0,0),(0,1),(1,0),(1,1)\}$$ So $$(x_1,x_2)$$ can take the values \begin{align} (x_1,x_2) &= (0,0)\\ (x_1,x_2) &= (0,1)\\ (x_1,x_2) &= (1,0)\\ (x_1,x_2) &= (1,1) \end{align} ?

Question 3:

Does the notation mean that $$(x_1,x_2)$$ only can assign ONE value of $$\{0,1\} \times \{0,1\}$$?

I.e. for $$(x_1,x_2)$$ we have 4 explicit cases: \begin{align} (x_1,x_2) &= (0,0) \\ \text{or} \quad (x_1,x_2) &= (0,1)\\ \text{or} \quad (x_1,x_2) &= (1,0)\\ \text{or} \quad (x_1,x_2) &= (1,1) \end{align}

Question 1. Yes, this is exactly the definition of 'square of a set $$A$$': you consider the cartesian product $$A \times A$$.
Question 2. Yes, $$(x,y)$$ belonging to $$A^2$$ means that it is an element of $$A \times A$$, so in your case $$(x_1, x_2)$$ is one of the elements of $$\lbrace 0, 1 \rbrace ^2$$.
Question 3. You can have $$(x_1,x_2)=(0,0)$$, for example, so you have only one of the possible values. This is because $$(x_1,x_2)$$ is one element of a set.
In general, the notation $$A^n$$, for a set $$A$$ and natural number $$n$$, means $$\underbrace{A \times \ldots \times A}_{n \text{ times}}.$$ So $$(x_1, \ldots, x_n) \in A^n$$ means that each $$x_i$$, for $$1 \leq i \leq n$$, is an element of $$A$$. Thus this is a tuple of $$n$$ elements of $$A$$ (allowing duplicates).