Fig . 6 .9 applies tf-idf weighting to the Shakespeare term-document matrix in Fig. 6 .2, using the tf equation Eq. 6.12. Note that the tf-idf values for the dimension corresponding to the word good have now all become 0; since this word appears in every document, the tf-idf weighting leads it to be ignored. Similarly, the word fool, which appears in 36 out of the 37 plays, has a much lower weight. Figure 6 .9 A tf-idf weighted term-document matrix for four words in four Shakespeare plays, using the counts in Fig. 6.2 . For example the 0.049 value for wit in As You Like It is the product of tf = log 10 (20 + 1) = 1.322 and idf = .037. Note that the idf weighting has eliminated the importance of the ubiquitous word good and vastly reduced the impact of the almost-ubiquitous word fool.