24

I've never encountered this question in any of my math classes and it just shows up randomly in my comsci class with no further info about it. I've wiki'ed it, but can't even understand that. Could someone explain to me exactly what it is?

Bill Dubuque
  • 272,048
Jonathan
  • 359
  • 15
    "Coprime" is a condition on a collection of numbers (usually a pair), not a number; it means they have no common factors. – Qiaochu Yuan Sep 12 '11 at 22:05
  • 2
    It's worth mentioning the distinction between "coprime" and "relatively prime": A set of integers is relatively prime if no integer > 1 divides all of them an example being (3, -7, 1). A set of integers is "coprime" if no integer > 1 divides any pair of them. So for two integers the two definitions coincide, but for more than two the property of "coprimeness" is stronger, because for example a set of three integers can be relatively prime but not coprime, e.g. (6, 15, -5) – John R Ramsden Jul 01 '20 at 09:10

4 Answers4

24

Two numbers are coprime if their highest common factor (or greatest common divisor) is $1$.

You can have the set of positive integers which are coprime to a given number: for example those coprime to $12$ are $1, 5, 7, 11, 13,17,19,23,25, $ and so on.

amWhy
  • 209,954
Henry
  • 157,058
  • 2
    Thanks. I guess other answers are "better" but I stated that I couldn't understand the wiki page on the term. Thanks for understanding that. – Jonathan Sep 13 '11 at 14:00
  • Just to add, any integer is coprime with 1. https://proofwiki.org/wiki/Integer_is_Coprime_to_1 – soham Nov 30 '16 at 05:44
10

A number $a$ is not "a coprime"; rather, "coprimeness" is a relation that may or may not hold between two numbers $a$ and $b$. In other words, $a$ and $b$ may or not be "coprime to each other".

What does it mean for $a$ and $b$ to be coprime? That they share no common factors other than $1$, or equivalently, $\gcd(a,b)=1$ (where $\gcd$ denotes the greatest common divisor, see here).

For example, $2$ and $5$ are coprime, because if $d$ is a factor of $2$ and $d$ is also a factor of $5$ (i.e., $d$ is a common factor of $2$ and $5$), then $d$ has to be $1$ (or $-1$, technically). In other words, $\gcd(2,5)=1$.

However, $2$ and $6$ are not coprime, because they share the common factor $2$; and $\gcd(2,6)=2$.

As Qiaochu says, we can extend the definition of coprimeness to any collection of two or more numbers by declaring the set of numbers $\{a_1,a_2,\ldots\}$ to be coprime when any $a_i$ and $a_j$ are coprime (for $i\neq j$).

For more info see the Wikipedia page.

Zev Chonoles
  • 129,973
  • But I think that coprime generalizes relatively prime , meaning $gcd (a,b)=1$ , to $gcd (a,b,c,d,..)=1$ (finite collection, of course) – gary Sep 12 '11 at 22:11
  • 1
    @gary: I think I would treat "coprime" and "relatively prime" as synonyms. Maybe I would say "pairwise" before either term if I wanted to be precise, but I don't think it's necessary. – Zev Chonoles Sep 12 '11 at 22:14
  • @gary: In the latter case we say the numbers are "pairwise coprime." The pairwiseness means you 'copy and paste' a relation meant for two numbers to every pair of numbers in a collection. – anon Sep 12 '11 at 22:15
5

By definition, a pair of integers $\rm\:a,b\:$ are coprime if they have only trivial common factors, i.e. $\rm\:gcd(a,b) = 1\:,\:$ i.e. $\rm\:c\ |\ a,b\ \Rightarrow\ c\:|\:1\:.\:$ A set of integers is pairwise coprime if every pair from the set is coprime. The same definition works over any integral domain.

Equivalent $ $ terminology: $\ \ a\,$ is coprime to $\,b;\ $ $\,a\,$ is prime to $\,b;\ $ $\,a\,$ is relatively prime to $\,b;\ \,$ and $\ a\,$ is mutually prime to $\,b;\ $ sometimes notated as $\,a\perp b$.

Coprime sets of integers share many of the properties of sets primes, e.g. factorizations into coprimes are unique. In fact in many number theoretic problems it suffices (and is more efficient) to work with coprimes rather than primes, e.g. see section $4.8$ on the concept of a gcd-free basis in Bach and Shallit: Algorithmic Number Theory.

Note: For ideals, some authors use coprime as a synonym for comaximal, i.e. $\rm\:I + J = 1\:.\:$

Bill Dubuque
  • 272,048
3

Two numbers are said to be co-prime if they do not have a common factor other than $1$. For example, the factors of $3$ are $1$ and $3$.

robjohn
  • 345,667
  • 11
    While what you say is true, it only makes sense to add an answer, especially after so much time and after several good answers have been given, if there is something more to be added. Your answer does not seem to add anything not found in one of the other answers. – robjohn Apr 21 '13 at 16:35