1
$\begingroup$

I want to solve equations with vector variables and vector/matrix parameters symbolically.

As a basic example I would like to be able to solve something like $[I-aG]x=b$ where $a,b \in \mathbb{R}^l$ are parameters, $x \in \mathbb{R}^l$ is the variable to be solved for, and $I$ and $G$ are $l \times l$ matrices. Namely, I would simply like Mathematica to output: $x=[I-aG]^{-1}b$.

Ultimately I would like to be able to solve symbolic systems of two linear simultaneous equations in two unknowns $x$ and $y$ such as \begin{align} Ax + By & = a \\ Cx + Dy & = b, \end{align} where all the capital objects are $l \times l$ matrices and all the lower case objects are vectors in $\mathbb{R}^l$. In this case I would like Mathematica to output something like (if my algebra is right): \begin{align} x & = (A-BD^{-1}C)^{-1}a - A^{-1}B(D-CA^{-1}B)^{-1}b \\ y & = -D^{-1}C(A-BD^{-1}C)^{-1}a + (D-CA^{-1}B)^{-1} b. \end{align}

I have been looking around here and could not really find anything addressing plain and simple algebraic manipulation of vectors and matrices. Really, the only things that differs from manipulating scalars is making sure to get the commutativity rules right, understand transposes, and write inverses rather than divisions. Is what I am talking about possible to do in Mathematica? Thank you!

$\endgroup$
  • $\begingroup$ Have you written any code you would like to share ? $\endgroup$ – Sektor Feb 13 '15 at 21:58
  • $\begingroup$ Not really, sorry. I just could not find any way of telling Mathematica "these objects are matrices and these are vectors" and then use the Solve command. All I have are solutions to systems of equations with scalars, with which I have no issues. $\endgroup$ – Matteo Feb 13 '15 at 22:03
  • $\begingroup$ This will get you started. $\endgroup$ – Sektor Feb 13 '15 at 22:16
  • $\begingroup$ Thank you for the link. To my understanding, however, the 'Solving Linear Systems' documentation page addresses the problem of solving linear systems with scalar objects by turning them into matrix form. This is a different problem to the one I am faced with. I am trying to manipulate algebraically equations whose elements are multidimensional to obtain a closed form symbolic expression of the solution. $\endgroup$ – Matteo Feb 13 '15 at 23:04
  • $\begingroup$ Welcome to Mathematica.SE! I suggest that: 1) You take the introductory Tour now! 2) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! 3) As you receive help, try to give it too, by answering questions in your area of expertise. $\endgroup$ – bbgodfrey Feb 14 '15 at 4:45