This question was motivated by [a recent MO post.](https://mathoverflow.net/q/406753/11260) You know $n$ elements of the $N\times N$ matrix $M$ and you do *not* know $n$ elements of the inverse $M^{-1}$ (but you know the other $N^2-n$ elements of $M^{-1}$). Equating $(M^{-1})^{-1}=M$ gives $n$ nonlinear equations in $n$ unknowns, which in general will have multiple solutions. Under which additional condition can one reconstruct the matrix $M$ uniquely? Does it matter where in the matrix are the $n$ elements located?


**Conjecture:** *A positive definite $N\times N$ matrix is uniquely determined by its diagonal elements and by the off-diagonal elements of its inverse.*


For $N=2$ it is true,$^\ast$ and some experimentation$^{\ast\ast}$ for larger $N$ suggests it is true for all $N$.




---


$^\ast$ For $N=2$ one has $M = \begin{pmatrix}a & b \\ b & c
\end{pmatrix}$, $M^{-1} = \frac{1}{a c - b^2} \begin{pmatrix}c & -b \\ -b & a
\end{pmatrix}$, we know $a,c$ and we know $\beta=b/(ac−b^2)$. There are two solutions for the unknown $b$, $b\_\pm=(\pm\sqrt{4ac\beta^2+1}−1)/2\beta$, only $b\_+$ gives a positive definite $M$.
$^{\ast\ast}$ [Mathematica test](https://ilorentz.org/beenakker/MO/pdtest.nb) for $N=3,4,5$, when there are, respectively, up to $5,14,22$ solutions for the unknown matrix elements, but only one of these gives a positive definite $M$.

Uniquely reconstruct a matrix $M$ from its inverse $M^{-1}$ if $n$ elements of $M^{-1}$ are unknown and $n$ elements of $M$ are given
The conjecture is true. More precisely, here is what I will prove:


**Theorem** Partition $\{ (i,j) : 1 \leq i \leq j \leq n \}$ into two disjoint sets, $A \sqcup B$. Let $X$ and $Y$ be positive definite $n \times n$ matrices and suppose that $X\_{ij} = Y\_{ij}$ for $(i,j) \in A$ and $(X^{-1})\_{ij} = (Y^{-1})\_{ij}$ for $(i,j) \in B$. Then $X = Y$.


**Lemma 1** Consider the function $f(M) = \log \det(M)$ on the space of $n \times n$ matrices $M$ with positive determinant. Then we can think of the gradient, $\nabla(f)$, as an $n \times n$ matrix as well. In this sense, we have $\nabla(f)|\_M = (M^{-1})^T$.


**Proof:** Let $E\_{ij}$ be the matrix with a $1$ in position $(i,j)$ and $0$'s everywhere else. Then $\nabla(f)\_{ij} = \tfrac{d}{dt} \log \det(M+t E\_{ij})$. This is $\tfrac{1}{\det(M)} \ \tfrac{d\ \det(M+t E\_{ij})}{dt} = \tfrac{1}{\det(M)} \cdot (-1)^{i+j} \det \widehat{M\_{ij}}$. Here $\widehat{M}\_{ij}$ is the $(n-1) \times (n-1)$ matrix where we delete row $i$ and column $j$. Using the formula for the inverse matrix in terms of the adjugate matrix, we see that $\nabla(f)\_{ij} = (M^{-1})\_{ji}$. $\square$


**Lemma 2** The function $f$ is strictly concave on the cone of positive definite matrices.


**Proof** Let $P$ be a positive definite matrix and let $Q$ be a symmetric matrix. We will show that $f(P+tQ)$ is concave for small $t$.


Since $P$ is positive definite, we can factor $P = ZZ^T$ for some invertible $Z$. Then $\log \det(P+Q t) = \log P + \log \det (\mathrm{Id} + t Z^{-1} Q (Z^{-1})^T)$. Since $Z^{-1} Q (Z^{-1})^T$ is symmetric, it is diagonalizable, say with eigenvalues $\lambda\_1$, $\lambda\_2$, ..., $\lambda\_n$. So $\log \det (\mathrm{Id} + t Z^{-1} Q (Z^{-1})^T) = \sum \log (1+t \lambda\_i)$. As long as $|t| < \min(|\lambda\_i|^{-1})$, this is a sum of concave functions. $\square$


Now, let $A$, $B$, $X$ and $Y$ be as in the statement of the theorem. Let $V = \mathrm{Span}\_{(i,j) \in B} (E\_{ij}+E\_{ji})$.


The condition that $X\_{ij} = Y\_{ij}$ for $(i,j) \in A$ means that $Y$ is in
the affine space $X+V$.


From Lemma 1, the condition that $(X^{-1})\_{ij} = (Y^{-1})\_{ij}$ for $(i,j) \in B$ means that $f$, when restricted to the affine space $X+V$, has the same gradient at $X$ and at $Y$.


Now, the space of positive definite matrices is convex, so its intersection with the affine space $X+V$ is convex, so we can draw a line segment from $X$ to $Y$ and the line segment will stay in the
space of positive definite matrices. By Lemma 2, our function $f$ restricted to this line segment will be strictly concave. But by our observation in the previous paragraph, this function has the same derivative at $X$ and at $Y$. This is only possible if the line segment has length $0$, so $X=Y$. $\square$




---


This was a uniqueness result. I will now prove an existence result. Let $A$ and $B$ be as above, and let $P$ and $Q$ be positive definite matrices. I will now show that there is positive definite matrix $X$ with $X\_{ij} = P\_{ij}$ for $(i,j) \in A$ and $(X^{-1})\_{ij} = Q\_{ij}$ for $(i,j) \in B$.


As above, let $V=\mathrm{Span}\_{(i,j) \in B} (E\_{ij}+E\_{ji})$. Let $K$ be the intersection of the affine space $P+V$ with the cone of positive definite matrices. Let $g(X) = \log \det X - \mathrm{Tr}(QX)$. We will show that there is a point $X$ in $K$ where $\nabla(g)=0$. Since $X \in K$, the matrix $X$ is positive definite with $X\_{ij} = P\_{ij}$ for $(i,j) \in A$. By the computations in the first part, the equation $\nabla(g)=0$ shows that $(X^{-1})\_{ij} = Q\_{ij}$.


So we are reduced to the goal of showing that $g$ has a local maximum in $K$. Fortunately, $P \in K$, so $K$ is nonempty. Unfortunately, $K$ is not compact. So we need to replace it by a compact version. Let $\overline{K}$ be the set of positive semi-definite matrices in $P+V$. So $\overline{K}$ is closed, but not yet compact.


**Lemma** There is a constant $c>0$ such that, for all positive definite matrices $X$, we have $|X| \leq c \mathrm{Tr}(QX)$, where $|X|$ is the Frobenius norm.


**Proof** The statement of the Lemma is invariant under conjugating $Q$ and $X$ by an orthogonal matrix, so we may assume that $Q$ is diagonal, with diagonal entries $0 < q\_1 < q\_2 < \cdots < q\_n$. So
$$\mathrm{Tr}(QX)= \sum\_i q\_i X\_{ii} \geq q\_1 \sum\_i X\_{ii}.$$
We also have
$$|X| = \sqrt{ \sum\_{i,j} X\_{ij}^2} \leq \sqrt{\sum\_{i,j} X\_{ii} X\_{jj}} = \sum\_i X\_{ii}.$$
(We have used that $X$ is positive definite to deduce the Cauchy-Schwartz inequality $X\_{ij}^2 \leq X\_{ii} X\_{jj}$.) So we can take $c=q\_1$. $\square$.


Now, if the eigenvalues of $X$ are $\lambda\_1$, $\lambda\_2$, \dots, $\lambda\_n$, then $\det(X) = \prod \lambda\_i$ and $|X| = \sqrt{\sum \lambda\_i^2}$ so we have $\det(X) \leq |X|^n$ and thus $\log \det(X) \leq n \log |X| \leq n (\log \mathrm{Tr}(QX)+\log c)$. So $g(X)$ is bounded above by $n \log \mathrm{Tr}(QX) - \mathrm{Tr}(QX) + n \log c$.


We have $\lim\_{z \to \infty} n \log z - z=- \infty$ so, if $\mathrm{Tr}(QX) \to \infty$ then $g(X) \to - \infty$. Thus, we can choose some large $M$ such that the value of $g$ at $P$ is larger then its value on the half space $\{ X : \mathrm{Tr}(QX) \geq M \}$.


Now, consider the function $X$ on $\overline{K} \cap \{ X : \mathrm{Tr}(QX) \leq M \}$. This, finally, is a compact set, so $g$ achieves a maximum somewhere on it. The maximum is not at the positive semidefinite points, since $g$ is $-\infty$ there, and it is not on the hyperplane $\{\mathrm{Tr}(QX) = M \}$ by the choice of $M$. So the maximum is in the interior and we win. $\square$


