# What are the conditions on matrix Y, such that AYx = Yb?

I feel I should know this, but here's the question.

Edited to add the assumption missed when first posted.

Given matrix $A$, vectors $x$ and $b$ where $Ax=b$ and matrix $Y$, what are the conditions on $Y$ to ensure $AYx = Yb$. Obviously $Y=I$ works, but what other $Y$'s work?

• Why is it obvious that $Y=I$ works? Are we assuming that $Ax=b$? – 211792 Sep 2 '16 at 21:13
• If $A\mathbf{x} = \mathbf{b}$ then $Y = A^{-1}$ works for invertible $A$. – ÍgjøgnumMeg Sep 2 '16 at 21:15
• Also, this question only even makes sense if $x$ and $b$ are vectors with the same number of entries (so that both can be multiplied on the left by the same matrix $Y$). – Zev Chonoles Sep 2 '16 at 21:15

If we're making the assumption that $Ax=b$, then any matrix $Y$ which commutes with $A$ will work, since we would then have \begin{equation} AYx = YAx = Yb. \end{equation}

Assume $A$ is a $n \times n$ matrix and $x = (x_1,\dots,x_n)^T$ and $b = (b_1,b_2,\dots,b_n)^T$ are $n \times 1.$

Result: All $Y$ such that $AYx = Yb$ can be determined from the null space of the $n \times n^2$ matrix $M = \left[ \begin{matrix} x_1A - b_1I & x_2A - b_2I & \dots & x_nA-b_nI\end{matrix}\right]$. If $\alpha = (\alpha_{11},\alpha_{21},\dots,\alpha_{n1},\alpha_{12},\alpha_{22},\dots,\alpha_{n2},\dots,\alpha_{n1},\dots,\alpha_{nn})^T$ is an arbitrary point in the kernel of $M$ then $Y=\sum_{i=1}^n\sum_{j=1}^{n} \alpha_{ij} E_{ij}$ solves $AYx = Yb$ and vice-versa where $E_{ij}$ denotes the $n \times n$ matrix with $1$ at the $(i,j)$th entry and 0 everywhere else.

Proof: $T(Y) = AYx - Yb$ is a linear transformation from the space of $n \times n$ real matrices to $R^n$ and we want to find all $Y$ in the kernel of $T$.

We have $T(E_{ij}) = AE_{ij}x - E_{ij}b = A_{.i}x_j - b_je_i$, where $A_{.i}$ denotes the ith column of $A$ and $e_i$ is the vector with $1$ at the ith position and $0$ elsewhere..

The ordered set $B_1=\{E_{11},E_{21},\dots,E_{n1},E_{12},E_{22},\dots,E_{n2},\dots,E_{1n},E_{2n},\dots,E_{nn}\}$ is a basis of the space of $n \times n$ matrices and let $B_2$ be the basis on $R^n$ consisting of the canonical vectors $e_1,\dots,e_n$.

The matrix of $T$ with respect to $B_1$ and $B_2$ is the $n \times n^2$ matrix $M = \left[ \begin{matrix} x_1A - b_1I & x_2A - b_2I & \dots & x_nA-b_nI\end{matrix}\right]$ and the result follows.