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? $\endgroup$(RowReduce[mat, ZeroTest -> (PossibleZeroQ[Simplify[#]] &)]) // MatrixForm
if 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? $\endgroup$x/x
is not 1 whenx
is 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/x
by 1 before the kernel even gets hold of it. But I am not sure. $\endgroup$