### Definition

For any pair of integers a, b with b not zero, the ratio a:b is called a **fraction** the ratio a:b, it is denoted `a/b`, a is called the
numerator
and b the
denominator.

A fraction is also called a
rational number.

- Note :`a/b`=a:b
- Example :`1/2` = 1:2 = 0,5

### Simplifying a fraction

To **simplify a fraction** we start by
decomposing the numerator and denominator into a product of prime numbers.
When the same number appears in both the numerator and denominator, we can **simplify the fraction**.

Example : `56/32` = `(2*2*2*7)/(2*2*2*2*2)` = `7/4`

### Irreducible fraction

A **fraction is said to be irreducible** if its numerator and denominator are prime to each other
To ** put a fraction into its irreducible form** sous sa forme **irréductible**, we divide the numerator and denominator by their
gcd
.

### Equal fractional writing

- When we multiply the numerator and denominator of a fractional writing by the same non-zero number, we obtain a fractional writing that is equal to it.
- When you divide the numerator and denominator of a fractional number by the same non-zero number, you get a fractional number that is equal to it.

### Fraction comparison

**Equality of fractions**
Two **fractions are equal** if it is possible to go from one to the other by multiplying or dividing the numerator and denominator by the same number.

**Fractions have the same denominator**
Simply compare the numerators.

**Fractions have the same numerators**
The largest is the one with the smallest numerator.

**Fractions have different numerators and denominators**
We return to the case where the denominators are equal by applying the equality condition of a fraction.

These are the calculation techniques that the
fraction comparator will use in this example to compare the fractions `19/11` and `13/7`.

### Adding fractions with the same denominator

The **sum of two fractions** with the same denominator has the same denominator, so its numerator is equal to the sum of the numerators.

Therefore, we have the formula:`a/k+b/k=(a+b)/k`

The following example : `1/3+4/3` shows how to add two fractions that have the same numeratorr.

### Adding fractions with different denominators

We reduce the fractions to the same denominator, to get back to the case of adding fractions with the same denominator.

### Subtraction of fractions with the same denominator

The **difference of two fractions** with the same denominator has the same denominator, its numerator is equal to the difference of the numerators.

Therefore, we have the formula:`a/k-b/k=(a-b)/k`

The following example: `4/3-2/3` shows how to subtract two fractions that have the same numerator.

### Subtracting fractions with different denominators

We reduce the fractions to the same denominator, to get back to the case of subtracting fractions with the same denominator.

### Product of fractions

The **product of two fractions** is equal to the product of the numerators over the product of the denominators.

#### Example :

`3/4*7/3` = `21/12`

The following example `3/4*7/5` : shows how to multiply two fractions.

### Division of fractions

Dividing by a fraction is the same as multiplying by the inverse of that fraction, using this rule it is possible to turn a fraction quotient into a fraction product and apply the rules for simplifying a product of fractions.

Example:`(-8/3)/(2/3)` = `-8/3*3/2` = `-8/2` = -4