A confusion matrix is a table used in machine learning to evaluate the performance of a classification model. It provides a detailed breakdown of the model's predictions, showing the true positive, true negative, false positive, and false negative values.