# Finding a set of matrices based on eigenvalues and eigenvectors with constraints

I'm trying to solve the following problem and hope for some helpful insights on how to approach this:

In the 3-dimensional case, for and a given set of eigenvalues and eigenvectors and chosen values $$a$$ and $$b$$, $$c$$, find the set of 3 by 3 matrices that have the corresponding eigenvalues and eigenvectors (if it exists). Some elements of the matrix and eigenvectors are fixed values.

For example in the 3-dimensional case:

Eigenvalues: $$\lambda_1=3$$, $$\lambda_2 = -1$$ and $$\lambda_3 = 2$$

Eigenvectors: $$v_1=\begin{bmatrix} 1 \\ 2 \\a \end{bmatrix}$$, $$v_2=\begin{bmatrix} 2 \\ b \\1 \end{bmatrix}$$ and $$v_3=\begin{bmatrix} c \\ 0 \\-1 \end{bmatrix}$$

The matrix has the following fixed elements: $$\begin{bmatrix} x_{11} & 2 & x_{13} \\ x_{21} & x_{22} & 1 \\ x_{31} & 3 & x_{33} \end{bmatrix}$$

In other words: Let's say I set $$a=2$$ and $$b=-1$$ and $$c=1$$. What are the possible matrices with fixed values $$x_{12}=2$$,$$x_{23}=1$$ and $$x_{32}=3$$ with eigenvalues $$\lambda_1=3$$, $$\lambda_2 = -1$$ and $$\lambda_3 = 2$$ and eigenvectors $$v_1=\begin{bmatrix} 1 \\ 2 \\2 \end{bmatrix}$$, $$v_2=\begin{bmatrix} 2 \\ -1 \\1 \end{bmatrix}$$ and $$v_3=\begin{bmatrix} 1 \\ 0 \\-1 \end{bmatrix}$$.

Also, it would be interesting to know under what circumstances solutions exist and how many possible solutions there are?

My first idea was to solve the eigenvalue equations for each eigenvalue and eigenvector: $$(A-\lambda I)v=0$$

for example for $$\lambda_1$$ and $$v_1$$:

$$\begin{bmatrix} x_{11}-3 & 2 & x_{13} \\ x_{21} & x_{22}-3 & 1 \\ x_{31} & 3 & x_{33}-3 \end{bmatrix} \begin{bmatrix} 1 \\ 2 \\2 \end{bmatrix} =\begin{bmatrix} 0 \\ 0 \\0 \end{bmatrix}$$

However, the values of $$x$$ must be true for all eigenvectors and not just for one. So I got stuck (or I'm missing something).

My second idea was to use the fact that a matrix $$M$$ can be obtained when knowing the eigenvectors and eigenvalues by $$M=PDP^{-1}$$ where $$P$$ is the matrix with the eigenvectors as columns and $$D$$ the diagonal matrix of eigenvalues. However, this does not take care of the constraints. Stuck again.

• Sorry, typo..corrected it now and edited post. Dec 11, 2018 at 14:01
• How does using $M=PDP^{-1}$ not “take care of the constraints?” That gives you a three-parameter family of matrices for which you need to reject the combinations of $a$, $b$ and $c$ that make $P$ singular.
– amd
Dec 11, 2018 at 18:47
• @amd: The problem is that when I specify $P$, $D$ and $P^{-1}$ (in case the determinant of $P$ is not 0) with given values $a$, $b$ and $c$ I get some matrix $M$ where all elements are set. It is not possible to consider the constraints, i.e. the elements of $M$ that have to be fixed values, here $x_{12}=2$, $x_{23}=1$ and $x_{32}=3$. Dec 11, 2018 at 20:53
• Those constraints generate three equations in $a$, $b$ and $c$. The solution set of those equations, less those solutions that produce a singular $P$, gives you the corresponding family of matrices. You might also consider the possibility that the problem is over constrained: there might not be any matrices with that eigendecomposition that also have the required entries.
– amd
Dec 11, 2018 at 23:33
• @amd: Thanks for the hint! But it seems, I'm not able to understand exactly what you mean. It would be nice if you post an answer, so that I can see the equations. This will probably help. And yes, it is especially interesting to understand when there are solutions and when not. Dec 12, 2018 at 11:15

For each permutation of possible eigenpairs $$(\lambda_i,v_i),$$ solve the three systems of equations corresponding to $$Av_i=\lambda v_i$$ with $$A=\begin{bmatrix} x_{11} & 2 & x_{13} \\ x_{21} & x_{22} & 1 \\ x_{31} & 3 & x_{33} \end{bmatrix}.$$
At a first glance I'd guess there are $$6$$ solutions as is the number of permutations of $$3,$$ which corresponds to possible eigenpairs $$(\lambda_i,v_i).$$ Anyway, some systems can have infinite number of solutions, or none.
• Just saw your post. I tried that, but either I was doing something wrong or I wasn't able to figure out the formula such that the values of $x$ are true for all eigenvectors. In other words, shouldn't it be a system of 9 equations? Dec 11, 2018 at 14:05