In order to solve certain problems in calculating probabilities, such as Markov chains or conditional
specification of discrete distributions, the use of matrix and vector treatment of conditioned probabilities and of
vectors of marginal probabilities is common. Following these ideas, the present study obtains matrix forms of
some elementary results of probability theory, such as the total probability and Bayes theorems. These results
and methodology are applied to the matrix study of results of diagnostic tests, allowing an immediate
generalization to tests with more than two results. In addition,we propose safety and validity measures of a test
based on matrix rules, which in some cases are related to the well-known Youden index