1
$\begingroup$

My question is at the frontier of maths and mathematica, but the main point is to ask if it is feasible in mathematica and which functions can help me to do it, that is why I posted it here.

I have an invertible linear system of equations.

I don't exactly know the number of equations I have (in fact I haven't finished the preliminary work to get to it), but to give an Idea it will approximatively be 20 equations.

I can write my problem like this :

$$ A.X = B $$

To solve it I could invert the matrix $A$ to get :

$$X=A^{-1} B$$

But I am pretty sure that it would be too hard for mathematica (I recall that it is not a numerical problem, but an analytic one, my matrix is full of unknown variables).

In fact I am only interested in the first line of my system : $X(1)$ (maybe it can help to solve the problem).

Thus, I am wondering if there is a better mathematical method to help me to do it. I have heard about LU decomposition but maybe there is an even better method as I am just interested in $X(1)$ ? (I don't know very well LU decomposition, I just heard it is "faster" than a matrix inversion but I don't know much more)

And if there is such method, my main question is : which mathematica functions can help me to do it ?

Finally :

  • What is the most efficient method to analytically solve my problem : I only need to get $X(1)$ in my system ?
  • How is it implemented in Mathematica ?
  • Do you think that for a linear system of 20-30 equations it is feasible with mathematica ? Or it is too hard ? (I have a fast laptop but I am not working on supercomputer for example).
$\endgroup$
3
  • $\begingroup$ Whether it is feasible or not depends on the sparsity of your matrix. You might want to look at LinearSolve, which solves linear equations without fully inverting the matrix. $\endgroup$
    – yohbs
    Jun 8, 2017 at 1:23
  • $\begingroup$ When you say $X(1)$, do you mean the first row of X or the first column? $\endgroup$
    – bill s
    Jun 8, 2017 at 3:00
  • $\begingroup$ The first row. X is a column vector $\endgroup$
    – StarBucK
    Jun 8, 2017 at 10:01

0

Browse other questions tagged or ask your own question.