What is the meaning of Z^2 in set notation?

In summary, the set of all integers, Z^2, is the cartesian product of $\mathbb{Z}$ and $\mathbb{Z}^2$. The values contained in this set are all integers that are less than or equal to two.
  • #1
katye333
10
0
Hello all, I'm having a lot of trouble when it comes to set notation.
For instance, what does (the set of all integers) \(\displaystyle Z^2\) mean?
What values are contained in this set?Sorry if I didn't use the MATH tags right.
 
Physics news on Phys.org
  • #2
Hello Katye! I assume you mean $\mathbb{Z}^2$. This is shorthand notation for $\mathbb{Z} \times \mathbb{Z}$, which is a cartesian product.

When we write $\mathbb{Z} \times \mathbb{Z}$ we mean a set with elements of the form $(a,b)$, where $a$ (or the first component) and $b$ belong to $\mathbb{Z}$. In general, whenever we have $A \times B$, with $A$ and $B$ sets, we write in set notation as follows:

$$A \times B = \{ (a,b) \in A \times B : a \in A, b \in B \}.$$

This is saying that the set $A \times B$ constructed from the sets $A$ and $B$ have elements denoted $(a,b)$ where the first component belongs to $A$ and the second belongs to $B$. Likely if you have more than three components: you'll always read each component as belonging to the corresponding set in order.

For example, try to tell in the following cases how are the elements in each set:

$$\mathbb{R} \times \mathbb{Z},$$ $$\mathbb{R} \times \mathbb{Q},$$ $$\mathbb{Z} \times \mathbb{Q} \times \mathbb{Z}.$$

Cheers! :D
 
  • #3
Fantini said:
Hello Katye! I assume you mean $\mathbb{Z}^2$. This is shorthand notation for $\mathbb{Z} \times \mathbb{Z}$, which is a cartesian product.

When we write $\mathbb{Z} \times \mathbb{Z}$ we mean a set with elements of the form $(a,b)$, where $a$ (or the first component) and $b$ belong to $\mathbb{Z}$. In general, whenever we have $A \times B$, with $A$ and $B$ sets, we write in set notation as follows:

$$A \times B = \{ (a,b) \in A \times B : a \in A, b \in B \}.$$

This is saying that the set $A \times B$ constructed from the sets $A$ and $B$ have elements denoted $(a,b)$ where the first component belongs to $A$ and the second belongs to $B$. Likely if you have more than three components: you'll always read each component as belonging to the corresponding set in order.

For example, try to tell in the following cases how are the elements in each set:

$$\mathbb{R} \times \mathbb{Z},$$ $$\mathbb{R} \times \mathbb{Q},$$ $$\mathbb{Z} \times \mathbb{Q} \times \mathbb{Z}.$$

Cheers! :D

Thank you for responding!

So, for the first one of yours:
A would be $\mathbb{R}$ and B would be in $\mathbb{Z}$?

Now if I have a function defined as
f: D -> $\mathbb{R}$ :: g((n, m)) = \[\sqrt{n-2m}\] with $D\subseteq $$\mathbb{Z}$\(\displaystyle ^2\)

What would the range be? If I try what you said above, then n would in $\mathbb{R}$
and m would be in $\mathbb{Z}$ ?
Or would (n, m) both be in $\mathbb{Z}$ ?

Sorry, I can't seem to get this to format correctly! I'm trying :)
 
  • #4
You are almost right: we have that $A$ is $\mathbb{R}$ and $B$ is $\mathbb{Z}$. Although technically it is also contained in $\mathbb{Z}$, it is best we say precisely what the object is. One thing: try not to attach yourself to the notation. I could have used $X \times Y$ just as well as $A \times B$. :)

But you didn't answer my question: I asked you to describe the elements. You have identified the sets, which is the first part, but now you need to complete the description. :D

Here's a tip concerning how to write expressions in LaTeX: you can right-click the images, highlight "Show Math As" and then click on "TeX Commands" to see how the code looks. This shows the code and you can learn from there. :)

As for your question, let's see what we have here: a function from a subset of $\mathbb{Z}^2$ to the real numbers. In notation that is written

$$f: D \subseteq \mathbb{Z}^2 \to \mathbb{R}, \quad f(n,m) = \sqrt{n-2m}.$$

To make sense of what is happening let's put this in words. We have a function that takes two integers and turns them into a real number. If our function were defined in a subset of $\mathbb{R} \times \mathbb{Z}$, you are correct: we would have $n$ as a real number and $m$ as an integer. :D In our actual case, both are integers.

In order to find out the range of the function we have to take in account all possible restrictions. We don't have any divisions by zero, but we do have a square root. In this case we have to check that what's inside the root is always positive, because that is when it is defined. This leads us to conclude $n-2m \geq 0$ or that $n \geq 2m$.

Cheers! :D
 
  • #5
Fantini has described the domain of the function, that is, the "input" values for which the function is defined. Here, as Fantini said, the "input" to your function is a pair of integers (but not necessarily any pair of integers, since you have the condition $n \geq 2m$).

The range of the function is all possible values the function can take, given its set of inputs. How do we work it out? We know a few things:

- all outputs of the function are real numbers (since its codomain is $\mathbb{R}$).
- all inputs to the function are a pair $(n, m)$ of integers such that $n \geq 2m$.

Now, the second fact implies that $n - 2m$ is both non-negative, and an integer. Therefore whatever happens, the function will always output the square root of an integer. But can the function output the value of any integer? For instance, is there an $(n, m)$ with $n \geq 2m$ such that $f((n, m)) = \sqrt{7}$? What about $\sqrt{42}$?

This is important, because you can't just say that the range of the function is $\mathbb{R}$ - that is not true (for instance, the function can never return $\sqrt{0.5}$, which is a real number). In your case, here's something you can use - what if you set $m$ to zero? Then let $n$ be any positive integer, such that $n \geq 2m$ or $n \geq 0$ be satisfied, and you get $f((n, 0)) = \sqrt{n}$ for any non-negative integer $n$, which shows that in fact, there exists an $(n, m)$ with $n \geq 2m$ such that $f((n, m)) = \sqrt{k}$ for any non-negative integer $k$, which is just $(k, 0)$. No further work is required - we've covered all possible outputs, since we have established earlier than $n - 2m$ (what is under the square root) must be a non-negative integer either way.

So the range of the function, in this case, is:

$$\{ \sqrt{k} : k \in \mathbb{Z}^* \}$$

Where $\mathbb{Z}^*$ denotes the non-negative integers $0, 1, 2, \cdots$. As you can see, this is a subset of $\mathbb{R}$, but is not the same as $\mathbb{R}$ - there are many reals that are not in this set, but all elements of this set are reals.

In this case it was relatively easy to work out the range because of the integer restriction, but in many cases it is difficult, and often impossible (there are infinitely many "gaps" in the output values the function can assume, and it's not possible to describe them all in a simple manner). So in many cases, we just say the range of $f : X \to Y$ is just $\{ f(x) : x \in X \}$, which says the same thing but gives us less insight into how the function behaves.​
 
  • #6
Fantini said:
You are almost right: we have that $A$ is $\mathbb{R}$ and $B$ is $\mathbb{Z}$. Although technically it is also contained in $\mathbb{Z}$, it is best we say precisely what the object is. One thing: try not to attach yourself to the notation. I could have used $X \times Y$ just as well as $A \times B$. :)

But you didn't answer my question: I asked you to describe the elements. You have identified the sets, which is the first part, but now you need to complete the description. :D

A would be the set of all real numbers and B would be the set of all integers. Right?
Which would mean the first component of the ordered pair (for the Cartesian product) would be from $\mathbb{R}$
and the second component would be from $\mathbb{Z}$
I hope that's what you meant, otherwise I feel like I'm being redundant :p

Fantini said:
Here's a tip concerning how to write expressions in LaTeX: you can right-click the images, highlight "Show Math As" and then click on "TeX Commands" to see how the code looks. This shows the code and you can learn from there. :)

As for your question, let's see what we have here: a function from a subset of $\mathbb{Z}^2$ to the real numbers. In notation that is written

$$f: D \subseteq \mathbb{Z}^2 \to \mathbb{R}, \quad f(n,m) = \sqrt{n-2m}.$$

To make sense of what is happening let's put this in words. We have a function that takes two integers and turns them into a real number. If our function were defined in a subset of $\mathbb{R} \times \mathbb{Z}$, you are correct: we would have $n$ as a real number and $m$ as an integer. :D In our actual case, both are integers.

In order to find out the range of the function we have to take in account all possible restrictions. We don't have any divisions by zero, but we do have a square root. In this case we have to check that what's inside the root is always positive, because that is when it is defined. This leads us to conclude $n-2m \geq 0$ or that $n \geq 2m$.

Cheers! :D

Oh... Ok. I think I understand. So, what you're saying is that n and m are both integers because D is a subset of $\mathbb{Z}$.
I'm still not quite sure why the co-domain $\mathbb{R}$ would not come into play here.

And, for this problem, I had to solve for the domain which turned out to be $n-2m \geq 0$ as well. Is it normal for the domain and range to be the same?

EDIT: Oh wait, I see why n and m would be integers. It's because they're the inputs of the function which would mean they both correspond to the first set $\mathbb{Z}$, right?
 
Last edited:
  • #7
Bacterius said:
Fantini has described the domain of the function, that is, the "input" values for which the function is defined. Here, as Fantini said, the "input" to your function is a pair of integers (but not necessarily any pair of integers, since you have the condition $n \geq 2m$).

The range of the function is all possible values the function can take, given its set of inputs. How do we work it out? We know a few things:

- all outputs of the function are real numbers (since its codomain is $\mathbb{R}$).
- all inputs to the function are a pair $(n, m)$ of integers such that $n \geq 2m$.

Now, the second fact implies that $n - 2m$ is both non-negative, and an integer.​

How do we know that it is non-negative? Couldn't m equal, say -2 and n equal -1?
Making the function $-1 \geq -4$ which would still be true, right?

Bacterius said:
Therefore whatever happens, the function will always output the square root of an integer. But can the function output the value of any integer? For instance, is there an $(n, m)$ with $n \geq 2m$ such that $f((n, m)) = \sqrt{7}$? What about $\sqrt{42}$?

This is important, because you can't just say that the range of the function is $\mathbb{R}$ - that is not true (for instance, the function can never return $\sqrt{0.5}$, which is a real number). In your case, here's something you can use - what if you set $m$ to zero? Then let $n$ be any positive integer, such that $n \geq 2m$ or $n \geq 0$ be satisfied, and you get $f((n, 0)) = \sqrt{n}$ for any non-negative integer $n$, which shows that in fact, there exists an $(n, m)$ with $n \geq 2m$ such that $f((n, m)) = \sqrt{k}$ for any non-negative integer $k$, which is just $(k, 0)$. No further work is required - we've covered all possible outputs, since we have established earlier than $n - 2m$ (what is under the square root) must be a non-negative integer either way.

So the range of the function, in this case, is:

$$\{ \sqrt{k} : k \in \mathbb{Z}^* \}$$

Where $\mathbb{Z}^*$ denotes the non-negative integers $0, 1, 2, \cdots$. As you can see, this is a subset of $\mathbb{R}$, but is not the same as $\mathbb{R}$ - there are many reals that are not in this set, but all elements of this set are reals.

In this case it was relatively easy to work out the range because of the integer restriction, but in many cases it is difficult, and often impossible (there are infinitely many "gaps" in the output values the function can assume, and it's not possible to describe them all in a simple manner). So in many cases, we just say the range of $f : X \to Y$ is just $\{ f(x) : x \in X \}$, which says the same thing but gives us less insight into how the function behaves.​

I think I'm starting to understand. The notation used is just really throwing me off.
The range would be $\mathbb{Z}^+$ because (n, m) are contained in $\mathbb{Z}$ and using the domain $n \geq 2m$, we cannot have a negative integer. I'm still confused about why it cannot be negative. The only reason I can think of would be that it would turn the radical into an imaginary number, which is not contained in either $\mathbb{Z}$ or $\mathbb{R}$. Is that correct?​
 
  • #8
Yes, this time it is right! :D

For the second part, you mean that $n$ and $m$ are integers because $D$ is a subset of $\mathbb{Z}^2$, not $\mathbb{Z}$.

It is coming into play. It might not seem so because we are very used to the real numbers. Consider the case if we had defined the function not as $f: D \subseteq \mathbb{Z}^2 \to \mathbb{R}$ but as $f: D \subseteq \mathbb{Z}^2 \to \mathbb{Z}$. This poses an additional difficulty: not only the number inside the square root has to be positive, but the square root itself must be an integer. In this scenario, we cannot even have things like $\sqrt{3}$ or $\sqrt{42}$. Since we have defined the codomain of the function as the real numbers, it alleviates the need for attention to what is the output. :)

As Bacterius has pointed out, since $n$ and $m$ are integers, it follows that $n - 2m$ is an integer and this rules out the possibility of things like $\sqrt{0.25}$. This alone answers that the codomain does not coincide with the range. Also, be careful Katye: the domain is something with two variables, not one. An ordered pair is very different from a single number! :D

Good catch: you realized $n$ and $m$ do not have to be positive. And that is okay: if we consider the pair $(0,-2)$ it does satisfy the requirement $n-2m = 0 - 2(-2) = 4 \geq 0$, therefore it is a valid input to the function! However, take note: all that restricts us is the fact that $n - 2m \geq 0$. Bacterius concluded that the range is the set of all square roots of nonnegative integers since we can take $m=0$, leading to $n \geq 0$ and concluding that this is the largest set we can get.

You are correct: the only reason why we can't have $n - 2m < 0$ is that it would lead us outside the definition of square root of real numbers, therefore we can't allow it. :) Think you are following us? Don't hesitate to question more!

Cheers!
 
  • #9
Fantini said:
Yes, this time it is right! :D

For the second part, you mean that $n$ and $m$ are integers because $D$ is a subset of $\mathbb{Z}^2$, not $\mathbb{Z}$.

And the only reason it is $\mathbb{Z}^2$ and not $\mathbb{Z}$ is because there are two variables n and m, right? Because $\mathbb{Z}^2$ is shorthand for the Cartesian product, and this means $n$ belongs to $\mathbb{Z}$ and $m$ belong to $\mathbb{Z}$, which makes it squared. If there was only $n$, then it would be $\mathbb{Z}$ only, correct?

Fantini said:
It is coming into play. It might not seem so because we are very used to the real numbers. Consider the case if we had defined the function not as $f: D \subseteq \mathbb{Z}^2 \to \mathbb{R}$ but as $f: D \subseteq \mathbb{Z}^2 \to \mathbb{Z}$. This poses an additional difficulty: not only the number inside the square root has to be positive, but the square root itself must be an integer. In this scenario, we cannot even have things like $\sqrt{3}$ or $\sqrt{42}$. Since we have defined the codomain of the function as the real numbers, it alleviates the need for attention to what is the output. :)

As Bacterius has pointed out, since $n$ and $m$ are integers, it follows that $n - 2m$ is an integer and this rules out the possibility of things like $\sqrt{0.25}$. This alone answers that the codomain does not coincide with the range. Also, be careful Katye: the domain is something with two variables, not one. An ordered pair is very different from a single number! :D

Good catch: you realized $n$ and $m$ do not have to be positive. And that is okay: if we consider the pair $(0,-2)$ it does satisfy the requirement $n-2m = 0 - 2(-2) = 4 \geq 0$, therefore it is a valid input to the function! However, take note: all that restricts us is the fact that $n - 2m \geq 0$. Bacterius concluded that the range is the set of all square roots of nonnegative integers since we can take $m=0$, leading to $n \geq 0$ and concluding that this is the largest set we can get.

You are correct: the only reason why we can't have $n - 2m < 0$ is that it would lead us outside the definition of square root of real numbers, therefore we can't allow it. :) Think you are following us? Don't hesitate to question more!

Cheers!
 
  • #10
Yes! You have understood correctly! (Clapping)
 
  • #11
HUZZAH! Thank ya'll for all the help! :D
 

FAQ: What is the meaning of Z^2 in set notation?

What is the definition of Z^2?

Z^2 is the set of all ordered pairs of integers, where the first element in the pair represents the x-coordinate and the second element represents the y-coordinate.

How is Z^2 different from Z?

Z^2 is a two-dimensional set, while Z is a one-dimensional set. Z^2 contains ordered pairs of integers, while Z contains individual integers.

Can Z^2 be visualized on a graph?

Yes, Z^2 can be visualized on a two-dimensional graph, where each ordered pair is plotted as a point with the x-coordinate representing the horizontal axis and the y-coordinate representing the vertical axis.

Is Z^2 a countable or uncountable set?

Z^2 is a countable set, meaning that the elements can be listed or counted in a finite or infinite sequence.

What are some real-life applications of Z^2?

Z^2 is commonly used in computer graphics and programming to represent coordinates on a grid or screen. It is also used in mathematical proofs and in the study of number theory.

Similar threads

Replies
5
Views
2K
Replies
12
Views
1K
Replies
10
Views
1K
Replies
5
Views
2K
Replies
5
Views
2K
Back
Top