applications is in how the distance matrix can manifestly encode the metric axioms and in how it lends itself to the use of linear algebra techniques. That is, if with is a distance matrix for a metric distance, then the entries on the main diagonal are all zero (that is, the matrix is a hollow matrix), i.e. for all , all the off-diagonal entries are positive ( if ), (that is, a non-negative matrix), the matrix is a symmetric matrix (), and for any and , for all (the triangle inequality). This can be stated in terms of tropical matrix multiplication When a distance matrix satisfies the first three axioms (making it a semi-metric) it is sometimes referred to as a pre-distance matrix. A pre-distance matrix that can be embedded in a Euclidean space is called a Euclidean distance matrix. Another common example of a metric distance matrix arises in coding theory when in a block code the elements are strings of fixed length over an alphabet and the distance between them is given by the Hamming distance metric. The smallest non-zero entry in the distance matrix measures the error correcting and error detecting capability of the code. Additive distance matrix An additive distance matrix is a special type of matrix used in bioinformatics to build a phylogenetic tree. Let be the lowest common ancestor between two species and , we expect . This is where the additive metric comes from. A distance matrix for a set of species is said to be additive if and only if there exists a phylogeny for such that: Every edge in is associated with a positive weight For every , equals the sum of the weights along the path from to in For this case, is called an additive matrix and is called an additive tree. Below we can see an example of an additive distance matrix and its corresponding tree: Ultrametric distance matrix The ultrametric distance matrix is defined as an additive matrix which models the constant molecular clock. It is used to build a phylogenetic tree. A matrix is said to be ultrametric if there exists a tree such that: equals the sum of the edge weights along the path from to in A root of the tree can be identified with the distance to all the leaves being the same Here is an example of an ultrametric distance matrix with