5
$\begingroup$

Suppose I do the following:

enter image description here

Now, If I compute:

enter image description here

Then "Mathematica stops being symbolic". Why does this happen? I want the computation to show matrix entries in terms of $a,b,c,d$, similar to the first example. Is it possible to do that?

$\endgroup$
8
  • 1
    $\begingroup$ Hmm, yeah, I'm not even sure how Mathematica "knows" this. After all, what if b == e == 0? You'd hope the symbolic result would hold for all values of a, b, d, e, but it seems Mathematica's making some hidden assumptions at some point. $\endgroup$
    – thorimur
    Mar 25 at 22:57
  • 1
    $\begingroup$ For that matter, why does MatrixRank[{{a, b}, {c, d}}] give 2... $\endgroup$
    – thorimur
    Mar 25 at 23:01
  • $\begingroup$ What specific different result did you expect? $\endgroup$ Mar 25 at 23:56
  • 4
    $\begingroup$ Symbolic computations in Mathematica are often generically correct, meaning that the results ignore excepts on a locus of codimension ≥ 1. Even the first result is wrong if b == 2 a. I don't really see a big difference between the two examples. $\endgroup$
    – Michael E2
    Mar 26 at 0:56
  • 1
    $\begingroup$ @murray No. That's not what it is designed to do. It works over the field of rational functions in the variables present. See also this previous MSE thread (for which the present thread is essentially a duplicate). See also this. And this too might be relevant. $\endgroup$ Mar 26 at 14:30
5
$\begingroup$

This gives the weird result in a comment that has nothing to do with the matrix {{a, b}, {d, e}} in the question:

LinearSolve[{{c, d}, {a, b}}]@"getU" // Together

Mathematica graphics

$\endgroup$
3
  • $\begingroup$ The matrix may be obtained from LUDecomposition[mat] as well. $\endgroup$
    – Michael E2
    Mar 26 at 1:11
  • $\begingroup$ This is really what I have been looking for! Could you explain what is the @getU? $\endgroup$
    – Red Banana
    Mar 26 at 1:58
  • 2
    $\begingroup$ @BillyRubina It gets the "U" matrix of the LU decomposition, which is the result of Gaussian elimination. The "U" stands for upper triangular matrix. $\endgroup$
    – Michael E2
    Mar 26 at 2:05
2
$\begingroup$

Check: https://en.wikipedia.org/wiki/Gaussian_elimination

And from the documentation for RowReduce: RowReduce performs a version of Gaussian elimination, adding multiples of rows together so as to produce zero elements when possible. The final matrix is in reduced row echelon form. If m is a non-degenerate square matrix, RowReduce[m] is IdentityMatrix[Length[m]]. 

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.