If any two numbers have no common factor other than 1 then they are assumed to be relatively prime. If two numbers are relatively prime, then their greatest common factor is 1 and in case the two numbers are not relatively prime then their greatest common factor is the largest number that will divide both numbers equally.

For example we have two numbers 16 and 15 where the factors for 15 are 3, 5, and 15. The factors for 16 are 2, 4, 8, and 16. We can see that both 15 and 16 are composite numbers yet they are relatively prime. In case we are taking numbers a, b, c, d…as relatively prime numbers then the least common multiple of the two relatively prime numbers ‘a’ and ‘b’ is their product ‘ab’.

We could also say that if a, b, c, d… are relatively prime numbers, then each number divisible by all of them is also divisible by their product.

**Example:** Check whether 12 and 18 are relatively prime?

The factors of 12 are as follows: 2, 3, 4, 6, and 12

The factors of 18 are as follows: 2, 3, 6, 9, and 18

As per the rule and definition we could see that both the numbers have 2, 3, 6 as common factors.

These are not relatively prime number.Two integers are said to be relatively prime if they have no common positive factors except 1.

It means if we consider any two integers, they will share only one factor as common, which will be one.

Relatively prime numbers are sometimes called strangers or co-prime numbers.

### Relatively Prime Examples

Below are the examples based on relatively prime integers

**Example 1:**

The number 3 and 5 are relatively prime to each other.

since 3 = 3 × 1 and 5 = 5 × 1 , so it has only one as common factor.

Now, consider 3 and 6.

3 = 3 × 1 and 6 = 3 × 2 × 1

They both have 3 as common other than one. So, 3 and 6 are not relatively prime.

All prime numbers will be relatively prime.

For example, consider 7 and 11 .

They are prime numbers. So,

7 = 7 × 1 and 11 = 11 × 1

So they don't have any factors common than one.

So 7 and 11 are relatively prime.

If we consider the greatest common divisor,two integers m and n are relatively prime if there greatest common divisor is 1 .

So, the two relatively prime numbers need not be prime.

**Example 2:**

Consider 16 and 21

Factors of 16 are 1 , 2 , 4 , 8 , and 16

and factors of 21 are 1 , 3 , 7 and 21 .

They don't have any factors other than 1 common but they are not prime.

So all relatively prime numbers are not prime.

The method for calculating the number of relatively prime numbers less than a given

number is as follows:

**Step 1.** Find the prime factorization of the number and write it in exponential form.

**Step 2.** Taking each term separately,

**a.** Subtract 1 from the base.

**b.** Subtract 1 from the exponent of the base and evaluate the expression.

**Step3.** Multiply all the numbers together.

**Example 3:**

How many numbers less than 20 are relatively prime to 20 ?

**Solution:**

The prime factorization of 20 is: 2^{2} × 5^{1}.

Taking 2^{2} first, we get: 2 - 1 = 1 and 2^{(2 - 1)} = 2.

Taking 5^{1} we get: 5 - 1 = 4 and 5^{(1-1)} = 1.

Multiplying all of them together = 1 × 2 × 4 × 1 = 8.

The numbers which are relatively prime are 1 , 3 , 7 , 9 , 11 , 13 , 17 , and 19 . So indeed there are 8 .

Another way of defining relatively prime number is that "Two positive integers are said to be "relatively prime" if 1 is the only number that divides both of them evenly."

All prime numbers are co-prime to each other.

Number 1 is co-prime to every integer.

Relatively prime numbers can also have only -1 as common factor.

Hence, any two integers x and y are said to be relatively prime if they have only common factor 1 or - 1.