# Math Help - How's that div and mod are functions on Cartesian products of integer?

1. ## How's that div and mod are functions on Cartesian products of integer?

We know that cartesian product of two sets $A = \{a,b,c\}$ and $B = \{d,e,f\}$ is:

$A \times B\ =\ \{(a,d),(a,e),(a,f),(b,d),(b,e),(b,f),(c,d),(c,e), (c,f)\}$

and
$m\ \mathbf{div}\ n\ =$ the integer quotient obtained when $m$ is divided by $n$

$a\ \mathbf{mod}\ b\ =$ the integer remainder obtained when $a$ is divided by $b$

I'm reading a Discrete math book and I am on Functions chapter. It has a line in it that says:

" $\mathbf{mod}$ and $\mathbf{div}$ are really functions defined on Cartesian products of integers."

For what reason is this statement true? I know it's true but I've no idea why.

I don't see the connection between Cartesian product and the $\mathbf{mod}$, $\mathbf{div}$ functions.

Can anyone kindly tell me when I use $\mathbf{mod}$ and $\mathbf{div}$ functions how is that they are really functions on Cartesian products of integers?

2. ## Re: How's that div and mod are functions on Cartesian products of integer?

Originally Posted by x3bnm
We know that cartesian product of two sets $A = \{a,b,c\}$ and $B = \{d,e,f\}$ is:
$A \times B\ =\ \{(a,d),(a,e),(a,f),(b,d),(b,e),(b,f),(c,d),(c,e), (c,f)\}$
and
$m\ \mathbf{div}\ n\ =$ the integer quotient obtained when $m$ is divided by $n$
$a\ \mathbf{mod}\ b\ =$ the integer remainder obtained when $a$ is divided by $b$
I'm reading a Discrete math book and I am on Functions chapter. It has a line in it that says: " $\mathbf{mod}$ and $\mathbf{div}$ are really functions defined on Cartesian products of integers."
Can anyone kindly tell me when I use $\mathbf{mod}$ and $\mathbf{div}$ functions how is that they are really functions on Cartesian products of integers?
When posting this sort of question, it is useful to say what book.
I guess that from the way that textbook is using those words, both $\mod~\&~div$ assign pairs of integers to an integer.
So in that sense we have $\mathbb{Z}\times\mathbb{Z}\to\mathbb{Z}$.

3. ## Re: How's that div and mod are functions on Cartesian products of integer?

Originally Posted by Plato
When posting this sort of question, it is useful to say what book.
I guess that from the way that textbook is using those words, both $\mod~\&~div$ assign pairs of integers to an integer.
So in that sense we have $\mathbb{Z}\times\mathbb{Z}\to\mathbb{Z}$.

I'm reading Susanna S. Epp's Discrete Mathematics with Applications(Second Edition).

So if $3 = \{1,2,3\}$ and $2 = \{1^\prime, 2^\prime\}$

$3\ \times\ 2 = \{(1, 1^\prime),(1, 2^\prime), (2, 1^\prime),(2, 2^\prime),(3, 1^\prime), (3, 2^\prime)\}$

For $\mathbf{mod}$ and $\mathbf{div}$ function what do you assign here?

There are $6$ elements of $3 \times 2$. How do you calculate $div$ and $mod$ here?

Can you kindly explain on asssigning an integer to $\mathbb{Z}\times\mathbb{Z}\to\mathbb{Z}$? Sorry for not understanding.

4. ## Re: How's that div and mod are functions on Cartesian products of integer?

Sorry for reopening this thread. I thought I understood the problem. Sorry for jumping to conclusion so quickly.

@Plato:

Can you kindly elaborate on what you said about "assign pairs of integers to an integer" comment?

5. ## Re: How's that div and mod are functions on Cartesian products of integer?

Originally Posted by x3bnm
So if $3 = \{1,2,3\}$ and $2 = \{1^\prime, 2^\prime\}$

$3\ \times\ 2 = \{(1, 1^\prime),(1, 2^\prime), (2, 1^\prime),(2, 2^\prime),(3, 1^\prime), (3, 2^\prime)\}$

For $\mathbf{mod}$ and $\mathbf{div}$ function what do you assign here?
That doesn't make sense.

The book says that $mod$ and $div$ are functions defined on this cartesian product : $\mathbb Z \times \mathbb Z$ (or a subset).

6. ## Re: How's that div and mod are functions on Cartesian products of integer?

Originally Posted by x3bnm
Sorry for reopening this thread. I thought I understood the problem. Sorry for jumping to conclusion so quickly.
@Plato:
Can you kindly elaborate on what you said about "assign pairs of integers to an integer" comment?
I no longer have a copy of Epp's book. As I recall, wrote a positive review to the publisher. Because I have a positive impression of that text some of wording you posted worries me.
For the mod operator, it is clear that one could apply that operator to any pair integers and the output is an integer.
Examples from MathCad: $\mod(17,3)=2,~\mod(14,-3)=2,~\mod(3,6)=3$.

But on the other hand, there is no similar understanding for what $Div$ could mean. Clearly it is not true that any integer divides every integer. So how exactly does she define the $Div$ operator?

7. ## Re: How's that div and mod are functions on Cartesian products of integer?

Originally Posted by Plato
I no longer have a copy of Epp's book. As I recall, wrote a positive review to the publisher. Because I have a positive impression of that text some of wording you posted worries me.
For the mod operator, it is clear that one could apply that operator to any pair integers and the output is an integer.
Examples from MathCad: $\mod(17,3)=2,~\mod(14,-3)=2,~\mod(3,6)=3$.

But on the other hand, there is no similar understanding for what $Div$ could mean. Clearly it is not true that any integer divides every integer. So how exactly does she define the $Div$ operator?
Now it makes sense. Thank you for your response. I agree with you about the statement. Not all integers divide other integers.

So the statement is rather vague. No offense.

But I like this book. The author explained things here like teaching an elementary school kid.

8. ## Re: How's that div and mod are functions on Cartesian products of integer?

Originally Posted by x3bnm
But I like this book. The author explained things here like teaching an elementary school kid.
If that is important to you may I suggest Discrete Mathematics for Teachers
I did an Eisenhower Institute as a test site for that text.
IMO it was a huge success with the in service high school teachers.

9. ## Re: How's that div and mod are functions on Cartesian products of integer?

Originally Posted by Plato
If that is important to you may I suggest Discrete Mathematics for Teachers
I did an Eisenhower Institute as a test site for that text.
IMO it was a huge success with the in service high school teachers.
I'll look into the links. Again thanks.