To understand inverse document frequency, first we need to understand document frequency.
Document Frequency is the number of documents in which the word occurs irrespective of how many times it has occurred in those documents.
In case of inverse document frequency, we need to put the document frequency in the denominator while the total number of documents is the numerator.
For example: if the document frequency of a word “AMAN” is 2 in a particular document then its inverse document frequency will be 3/2.