How would you mathematically describe an integer?

  • Thread starter hxtasy
  • Start date
  • Tags
    Integer
In summary, integers are a fundamental concept in mathematics and can be described as numbers that are whole and do not contain any fractions or decimals. They can be defined in various ways, such as through sets or functions, but they are typically denoted by the symbol Z. In computer programming, integers are often represented by the data type "int" and can be obtained by rounding a number to the nearest whole number or by truncating the decimal part.
  • #1
hxtasy
112
1
For example a number whose domain would be all positive would be described as a number k, where k > 0.

How would you describe a number that is an integer, ie not 1.4, 7.666 et cetera. I can't think of a way to define this mathematically (or a way that includes any number of digits). I know there is a way though, considering the data type "int" that would be used i a computer programming language.


thanks for any input!
 
Mathematics news on Phys.org
  • #2
Well the most common way to do so would be to say:

A number k is an integer if [tex] k \in \mathbb{Z}[/tex].The set of the Integers is most commonly denoted in mathematical documents by Z, so people will know what you are trying to say if you say that.
 
  • #3
hxtasy said:
For example a number whose domain would be all positive would be described as a number k, where k > 0.

How would you describe a number that is an integer, ie not 1.4, 7.666 et cetera. I can't think of a way to define this mathematically (or a way that includes any number of digits). I know there is a way though, considering the data type "int" that would be used i a computer programming language.


thanks for any input!
Well, for example, these properties should hold:
1. 1 is an integer, and so is 0
2. For any integer n, n+1 and n-1 are also integers.
3. For any integer m, there exists an integer n so that m=n+1, or m=n-1
 
  • #4
All positive integers are the set of natural numbers.

To describe an integer mathematically?
The best I can think of is:

In the form [tex]\frac{m}{n}[/tex] where n is a factor of m.
 
  • #5
That doesn't work - What are m and n ?
 
  • #6
Mentallic said:
All positive integers are the set of natural numbers.

To describe an integer mathematically?
The best I can think of is:

In the form [tex]\frac{m}{n}[/tex] where n is a factor of m.
?

67.15 is a factor of -0.23. So their fraction is an integer?
 
  • #7
I thought the term "factor" was only defined for integers? Hence my last post, which points out the definition he posted is circular as it assumed m and n were integers in the first place.
 
  • #8
Well, if you insist...
 
  • #9
Well the way I understand factors is that the if m is divided by n, the end result is an integer. A recurring loop as Gib Z said.

Somehow I fail to see how 67.15 is a factor of -0.23, maybe I need to clarify for myself the definition of a factor?
 
  • #10
Well, of course, you might construct a definition of the "factor" so that it is independent of "integerness", so that you can utilize this to define integers in a non-circular way.

How do you plan to define factors, then, in a manner that does not refer to integers, and at the same time ensures you to avoid falling into the trap I set up?
 
  • #11
The trap would seem quite fruitless since I've already agreed with Gib Z's argument that my comment is circular in nature.

Gib Z said:
I thought the term "factor" was only defined for integers? Hence my last post, which points out the definition he posted is circular as it assumed m and n were integers in the first place.
 
  • #12
Mentallic said:
The trap would seem quite fruitless since I've already agreed with Gib Z's argument that my comment is circular in nature.
Well, since you agree that your definition is circular, and hence worthless, this point has been done to death, haven't it?
 
  • #13
It depends on the starting point. If the starting point is the real numbers; I would say "all members of the smallest inductive set, together with their additive inverses together with the additive identity". If the starting point are the rational numbers, same thing. If the starting point are the integers... well any member of the set in question. If the starting point are the natural numbers, "any ordered pair {a,b} of natural numbers" with an equivalence relation {a,b} ~ {x,y} iff a + y = x + b.
 
Last edited:
  • #14
This is a lot of good information.


I was more leaning towards how a computer would make something an integer (int), and these methods look like they would take too much time.

I'm guessing if you had some number coming in, 1.44456 you could take it in in IEEE floating point standard and then just cut off the decimal part, but other than that I have no idea the inner workings behind that stuff.
 
  • #15
Possibly you posted in the wrong forum; there's one under Other Sciences / Computer Science for these issues.

As for your question, I assume your language has an INT() function (if it doesn't, just assign your IEEE variable to an int if your number is positive; if it's negative, ask again). Let's call N = INT(X), where X was your original IEEE number.

Also I assume you know that "rounding the number to the closest integer" is provided by INT(X + 0.5), So let R = INT(X + 0.5).

With these assumptions, you have two options:

a) The quick and insecure:
Assign the IEEE X to the integer N, and then N back to another IEEE variable, say F, and compare X and F to see if they are equal.
The problem with this method is that, if X was the result of some calculation, then if might contain 9.9999 instead of 10; when you truncate 9.9999, you'll be comparing 9 to 10 and finding they are not equal. If your number X comes from a user interface, this "might" be safe, at least for small integers. If it comes from a calculation, better use method b.

b) Choose a "comparison tolerance" (for example, T = 0.00001), and now determine if R (the rounded one) and your original X are too far apart, farther than the tolerance T. Something like this: IF ABS(X-R) < T THEN ... X is very close to an integer.
 
  • #16
Integers are fairly fundamental. You can define them in terms of other things, such as sets or functions or whatever, but it's probably easier for most people to accept integers as a basic concept than those other kinds of objects.

You may also want to check out Peano's Axioms for the integers.

In computer languages, the datatype "int" usually denotes a bounded integer type, and NOT the full set of integers. But the subset of integers it can represent is large enough that most people don't care.
 
  • #17
For any set A, you define a sucessor set A' by:

A' = Union of A and {A}

Here {A} is the set that has A as its sole element. If you take the union of this set with A, then you are adding one element (the set A considered as an element) to A.

To define the integers, you can define zero to be the empty set:

0 = {}

Next you define 1 as the successor of 0:

1 = 0' = Union of 0 with {0} = {0}

2 is the successor of 1:

2 = 1' = Union of 1 with {1} = Union of {0} with {1} = {0,1}


So, if you proceed in this way, you end up with:


n = {0,1,2,...,n-1}
 

1. What is an integer?

An integer is a whole number that can be positive, negative, or zero. It does not include fractions or decimals.

2. How is an integer represented mathematically?

An integer can be represented using the symbol "Z" or "ℤ", which stands for the set of all integers. It can also be represented as a number on the number line.

3. What is the difference between integers and whole numbers?

Integers include both positive and negative numbers, while whole numbers only include positive numbers. In other words, the set of integers is a superset of whole numbers.

4. How do you perform mathematical operations with integers?

Addition, subtraction, multiplication, and division can all be performed with integers. When adding or subtracting integers with the same sign, add the numbers and keep the sign. When adding or subtracting integers with different signs, find the difference between the numbers and use the sign of the larger number. For multiplication and division, follow the standard rules of arithmetic.

5. Can integers be used to represent real-life quantities?

Yes, integers can be used to represent real-life quantities such as temperature, money, and population. For example, a temperature of 5 degrees Celsius can be represented as the integer 5, and a loss of $10 can be represented as the integer -10.

Similar threads

Replies
4
Views
220
  • General Math
Replies
1
Views
1K
Replies
4
Views
417
Replies
1
Views
1K
  • General Math
Replies
9
Views
1K
Replies
1
Views
1K
Replies
6
Views
2K
  • General Math
Replies
28
Views
2K
  • General Math
Replies
13
Views
1K
Back
Top