# Number of possible ways to form matrix so that $Ax =Ix$

Suppose that a vector $x$ is given. We want to find out the total number of possible ways to form a matrix $A$ so that $Ax = Ix$ where $I$ is $n \times n$ identity matrix and $A$ is some $n \times n$ matrix.

-
That matrix will not be unique. Notice that this simply means that $A$ has $x$ as eigenvector with 1 as corresponding eigenvalues. the remaining elements could be arbitrary. –  Learner Dec 11 '12 at 8:49
I edited the question. –  La Ventana Dec 11 '12 at 8:52

Consider a diagonal matrix $D =\text{diag} \left( 1, d_1, \ldots, d_{n - 1} \right)$ and a matrix $P = \left( x, p_1, \ldots, p_{n-1} \right)$ such that its columns are linearly independent. Then, all matrices $A = PDP^{- 1}$ are possible candidates.

-

The equation $Ax=x$ (or $Ax-x=0$) is a homogeneous system of linear equations with $n^2$ unknowns. (Unknowns are the entries of the matrix $A$.)

The number of linearly independent equations is the number of non-zero entries of the vector $x$, let us denote this number by $m$.

The number of linearly independent equations is the length of vector $x$, i.e., it is $n$. (To see that the equations obtained from two different entries of the vector $x$ are independent, it suffices to notice that they contain unknowns from two different rows of the matrix $A$.)

The the dimension of solution set is $n^2-n$.

The only exception is if $x=0$, then all equations are of the form $0=0$ and any matrix fulfills these equations.

-

If $x=0$, then any $A$ will do.

Otherwise, let $U$ be a complement of $\langle x\rangle$ in $F^n$, that is $F^n=\langle x\rangle \oplus U$. Then if $f\colon U\to F^n$ is any endomorphism, $(x,u)\mapsto x+f(u)$ is an endomorphism of $F^n$ sending $x\mapsto x$ as desired. Thus we see that the space of such matrices is $n\cdot(n-1)$-dimensional.

-

There are infinitely many ways of doing this, if $n>1$. Just complete $x$ to a basis of the vector space (this assumes $x\neq 0$, but for $x=0$ every matrix will do), letting $P$ be the matrix with the coordinates of those vectors as columns; now take any matrix $M$ with $(1,0,0,\ldots,0)$ down the first column and arbitrary entries elsewhere, and apply base change: $A=PMP^{-1}$ will do the trick. You can check that applying $PMP^{-1}$ to $x$ the first factor $P^{-1}$ will change $x$ to the column vector $(1,0,0,\ldots,0)$, then $M$ will leave that vector in place by the way it was constructed, and finally $P$ will map the vector back to $x$, so $Ax=x=Ix$.

-