You can write the ratio between the two numbers 5 and 7 as 5:7 or as 5/7. If you think the second form looks like a fraction, you're right. It's also a rational number, because it's a quotient, or ratio, of whole numbers. In this context, the words "ratio" and "rational" are related; a rational number is any number that can be written as a quotient of whole numbers. Rational numbers can be written in decimal form, but not all decimal numbers are rational. A number is rational only if you can write it as a quotient of whole numbers. The square root of 2 and pi (π) are two examples of numbers that don't satisfy this condition, so they are irrational numbers. Quotients with zero in the denominator are also irrational.
TL;DR (Too Long; Didn't Read)
To express a decimal as a quotient of whole numbers, divide by a power of ten equal to the number of decimal places.
Writing Integers as Quotients
The number 5 is a rational number, so you must be able to express it as a quotient, and you can. Dividing any number by 1 gives you the original number, so to express an integer like 5 as a quotient, you simply write 5/1. The same is true for negative numbers: −5 = −5/1.
Writing Decimals as Quotients
Decimals are just another way to write fractions. A single decimal place tells you to divide the number by 10, so 0.5 is the same as 5/10. Two places tells you to divide by 100, three places tells you to divide by 1,000 and so on. You divide by 10 to the power of the number of digits to the right of the decimal point.
Mixed numbers consisting of an integer and decimal are also rational because you can express them as a fraction. For example, to express 5.36 as a fraction:
You'd multiply the whole number and the denominator, add them to the numerator and then use that result as the numerator of the new fraction:
Some decimals consist of an infinite number of repeating integers, such as 0.33333... or 2.135135135.... These numbers appear irrational, but they aren't, because it is possible to write them as quotients of whole numbers. To do this, you divide the repeating string of numbers by an equally long string of 9s.
In the string 0.33333..., only the 3 repeats. Divide that by 9 to get 3/9, which simplifies to 1/3.
The number 2.135135135... has three repeating digits: 135. Divide 135 by a string of three 9s to get 135/999 and multiply that fraction by 2, which is the number to the left of the decimal point. Using the previous procedure to combine a whole number and fraction, you get: