For the latest version of JMP Help, visit

Publication date: 11/10/2021

Example of a Distance Matrix

The proper data table structure for a distance matrix consists of the following:

An identifier column (usually the first column) that has a Character data type.

A set of n columns, where n is also the number of rows. These n columns define a symmetric matrix with zero or missing values on the diagonal.

Notice that the distance matrix in Flight follows the preceding format.

1. Select Help > Sample Data Library and open Flight

2. Select Analyze > Clustering > Hierarchical Cluster.

3. In the list at the bottom left corner of the launch window, change Data as usual to Data is distance matrix.

4. Select Cities and click Label.

5. Select all remaining columns and click Y, Columns.

Figure 12.6 Completed Distance Matrix Launch Window 

Completed Distance Matrix Launch Window

6. Click OK.

7. Click the Hierarchical Clustering red triangle and select Color Clusters.

Figure 12.7 Dendrogram Report for Flight Distances 

Dendrogram Report for Flight Distances

In the Dendrogram report for the flight distances, the placement of the diamonds indicates that the model has grouped the cities into three clusters. The clusters are color-coded on the dendrogram. For more information about how to interpret the report, see Dendrogram Report.

Want more information? Have questions? Get answers in the JMP User Community (