Fraction is the number in the form of numerator/denominator, where numerator and denominator are the integers and denominator ≠ 0. Numerator and denominator are a subset of integers. If the denominator is equal to 0 then the fraction is not defined or denominators are integers except 0. A fraction can be rational or irrational. Rational fractions are either terminating or repeating but irrational fraction neither terminate nor repeat.

When a number contains an integer part and a fraction part then it is called a mixed number.

**For example:**

- 5 / 2
- 3 / 5
- 22 /7
- 0 / 4
- 1 / 0
- -1 / 4
- 1 / -4
- -2 / -7
- 4
^{3}⁄_{13}- -11
^{12}⁄_{13}

All are fraction except 1 / 0 it is not defined.

**Different arithmetic operation are possible on fraction:**

- Addition
- Substraction
- Multiplication
- Division

**Basic rules for arithmetic operation:**

- If denominator of two or more than two fraction are same, simply add their numerator.
- If denominator of two or more than two fractions are not equal then make it equal by multiplying by different numbers so that it becomes equal but keep in mind that to balance the fraction multiply the numerator by same number too.
- For multiplication just multiply numerator by numerator and denominator by denominator.
- For division of two fraction multiply the dividend into reciprocal of divisor.

**Example:**

- (1 / 2) + (1 / 2) =(1 + 1) / 2 = 2 / 2 = 1
- (3 / 4) + (5 / 7) = (3 * 7 / 4 * 7) + (5 * 4 / 7 * 4) = (21 / 28) + (20 / 28) = (21 + 20) / 28 = 41 / 28
- (-5 / 6) + (-3 / 6) = (-5 - 3) / 6 = -8 / 6
- (2 / -3) + (1 / 4) = -(2 / 3) + (1 / 4) = -(2 * 4 / 3 * 4) + (1 * 3 / 4 * 3) = -(8 / 12) + (3 / 12) = (-8 + 3) / 12 = -5 / 12
- 2 / 5 - 1 / 7 = 14 / 35 - 5 / 35 = 9 / 35
- (4 / 7) * (2 / 3) = (4 * 2) / (7 * 3) = 8 / 21
- (-4 / 7) * (2 / -3) = -(4 * 2) / -(7 * 3) = 8 / 21
- (5 / 13) ÷ (3 / 25) = (5 / 13) * (25 / 3) = 125 / 139
- 4
^{3}⁄_{13}+ 4^{3}⁄_{13}= 55 / 13 + 55 / 13 = 110 / 13- 5
^{8}⁄_{15}- 3^{7}⁄_{15}= (83 / 15) - (52 / 15) = 29 / 15

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the **DSA Self Paced Course** at a student-friendly price and become industry ready.