# Clustering given pairwise distances with unknown cluster number?

I have a set of objects ${O_1, O_2, O_3, ..., O_n}$. I have calculated the pairwise distances of all possible pairs. The distances are stored in a $n\times n$ matrix $M$, with $M_{ij}$ being the distance between $O_i$ and $O_j$. Then it is natural to see $M$ is a symmetric matrix.

Now I wish to perform unsupervised clustering to these objects. After some searching, I find Spectral Clustering may be a good candidate, since it deals with such pairwise-distance cases.

However, after carefully reading its description, I find it unsuitable in my case, as it requires the number of clusters as the input. Before clustering, I don't know the number of clusters. It has to be figured out by the algorithm while performing the clustering, like DBSCAN.

Considering these, please suggest me some clustering methods that fit my case, where

1. The pairwise distances are all available.
2. The number of clusters is unknown.