# All solutions to the matrix equation $AX=B$

Could you please give me some tips, directions, on how to find all $3\times 3$ matrices$X$, so that $AX=B$. The matrices $A$ and $B$ are given.

I've made a long way, multiplying $A$ with $x_{k}$: $$\begin{align} Ax_{1} &= b_{1}\\ Ax_{2} &= b_{2}\\ Ax_{3} &= b_{3}\end{align}$$ Solved them as matrices and got $X$ with all it $x_{k}$ (columns), but it appears, that it wrong. Because when I substitute $X$ I get another $B$ matrix (the last column is wrong).

Do I use wrong strategy? Or the strategy is right and the answer should be right? How can I find all $X$? What does it mean?

Best.

-

1
If $\mathbf A$ is nonsingular, $\mathbf X$ is unique. Just treat the columns of $\mathbf B$ as successive right-hand sides of a linear system, and the solutions of those linear systems are the columns of $\mathbf X$. – J. M. Nov 2 '11 at 1:11
Did you check the rank of $A$? Is $A$ invertible? – user13838 Nov 2 '11 at 1:11
If your last column is wrong you probably made a mistake when you solved the LAST equation. – N. S. Nov 2 '11 at 1:20
Yes, It's invertible (checked it online). @percusse, what should rank tell me? – Lissa Nov 2 '11 at 1:24

2
@Lissa After having rest, please take your time and accept the answers of your questions (which you have not done yet!) by using the tick mark next to your favorite answers. In a way, it wraps up the question. – user13838 Nov 2 '11 at 2:15
show 1 more comment

## 1 Answer

Your strategy is right: $A X = B$ does mean the product of $A$ with each column of $X$ is the corresponding column of $B$. Perhaps something went wrong in your calculation.

If $A$ is nonsingular, $X$ is unique, and in fact it is $A^{-1} B$. If $A$ is singular (and $3 \times 3$), then depending on $B$ there might not be any solution; and if there is a solution, it will not be unique, because you can add any vector $x$ with $Ax = 0$ to any column of a solution $X$ and get another solution.

-

Thank you for response.  I found the mistake, so I got X-Matrix.  Do I have to find inverse matrix to prove, that there's only one 3x3-X-Matrix? – Lissa Nov 2 '11 at 1:37
That's one way to prove it.  Another way is to calculate the determinant of $A$: if that is not 0, the matrix is nonsingular. – Robert Israel Nov 2 '11 at 23:43
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 33, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9272303581237793, "perplexity_flag": "head"}