I have been working on some problems regarding finite metric spaces and have already proven/positively answered the following statement/question if the underlying metric has additional properties. Now I'm wondering if the statement is true in general.
Suppose we have a finite metric space $(X,d)$ and we fix $y \in X$. Now consider the matrix $$M(y) := ( d (x, y) + d (y, z) - d (x, z))_{x, z \in X\setminus \{y\}}$$ of all possible errors that arise in the triangle inequality where the 'middle point' is fixed.
Is $M(y)$ invertible?
Any ideas are greatly appreciated.
Here's a counterexample. Let $X=\{1,2,3,4\}$ with the metric given by the following matrix D of distances, i.e. the $(i,j)$-th entry is $d(i,j)$: $$D=\begin{bmatrix}0&1&2&1\\1&0&1&2\\2&1&0&1\\1&2&1&0\end{bmatrix}$$
In other words, this is a graph metric on the $4$-cycle graph, whose vertices are $1,2,3,4$ respectively. (We can also verify that this is a metric by definition, in which case the triangle inequality follows easily from the fact that $2\leq 1+1$.)
Then, we have $$M(1)=\begin{bmatrix}2&2&0\\2&4&2\\0&2&2\end{bmatrix},$$ which is singular, since the middle row is the sum of the other two.