Please note that the content of this book primarily consists of articles available from Wikipedia or other free sources online. A document-term matrix or term-document matrix is a mathematical matrix that describes the frequency of terms that occur in a collection of documents. In a document-term matrix, rows correspond to documents in the collection and columns correspond to terms. In a term-document matrix, rows correspond to words or terms and columns correspond to documents. There are various schemes for determining the value that each entry in the matrix should take. One such scheme is tf-idf. They are useful in the field of natural language processing.