I need to row-reduce the following matrix,
{{a, b, 0, 0, 0, 0, 0, 0, 1}, {0, 0, 0, 0, a1, b1, 0, 0, 1},
{0, 0, c, d, 0, 0, 0, 0, 1}, {0, 0, 0, 0, 0, 0, c1 ,d1, 1},
{0, b1, 0, -d1, a, 0, -c, 0, 0}, {-b1, 0, d1, 0, b, 0, -d, 0, 0},
{0, -a1, 0, c1, 0, a, 0, -c, 0}, {a1, 0, -c1, 0, 0, b, 0, -d, 0}}
After Mathematica does the computation, the bottom row is a row of zeros. This is to be expected (based on my problem). However, the second to bottom row is a row of zeros with a 1 at the end. When the algebra is done "by hand", one really should obtain a row of zeros with some linear combination of the variables involved instead of 1. Mathematica divides by this expression. This expression could be zero, and in my problem, I want that last matrix entry to be zero. How can I tell Mathematica not to simplify?
If you be kind,can you also upload the answer you are getting, so I can double-check with mine?
When the algebra is done "by hand"Can you show the hand solution then which is different from Mathematica solution? – Nasser Jul 01 '17 at 07:05(RowReduce[mat, ZeroTest -> (PossibleZeroQ[Simplify[#]] &)]) // MatrixFormif you want to see the content not simplified. But your question is not clear. Are you saying the second row from the bottom is supposed to be all zeros and not have 1 as it last entry? – Nasser Jul 01 '17 at 07:14x/xis not 1 whenxis symbol with no value. At least I do not know how to do it.Assuming[x == 0, Simplify[x/x]]gives 1 always. I think the front end replacesx/xby 1 before the kernel even gets hold of it. But I am not sure. – Nasser Jul 01 '17 at 07:37displayRREF[]could be used, if the last divide is omitted. One problem with this Q, I suspect, is that the answer (when leading coefficient is not reduced to1) is not unique but depends on the pivots. – Michael E2 Jul 01 '17 at 14:53StrictFunctionDomainfunction to get assumptions that Mathematica makes calculating "generic" solution:assum = StrictFunctionDomain@Flatten@RowReduce@mat (* a != 0 && a1 != 0 && c != 0 && c1 != 0 && -a1 b c c1 + a a1 c1 d != 0 *)wherematis your matrix. Then you could analyze distinct special cases separately:BooleanConvert[Not@assum, "ANF"], note that in general number of such special cases suffers from combinatorial explosion, here there are 31 of them. – jkuczm Jul 01 '17 at 15:47displayRREFonly works on square matrices, so I could not use it for this. The matrix in this post is 8 rows by 9 columns. – Nasser Jul 01 '17 at 20:15