3

It has been known that matrix A is equivalent to matrix B, and I want to find the possible value of parameter a (the answer is a = 2). This question is slightly different from that of this post.

A = {{1, 2, a}, {1, 3, 0}, {2, 7, -a}}; 
B = {{1, a, 2}, {0, 1, 1}, {-1, 1, 1}}; 
Solve[MatrixRank[A] == MatrixRank[B], a]

The above code can not output the correct results, I need your help.

Besides, I have another question. I find that RowReduce-function can't make the matrix with parameters into row simplest type:

RowReduce[{{1, a, 2}, {0, 1, 1}, {-1, 1, 1}}]

The row simplest form of matrix $\left(\begin{array}{ccc} 1 & a & 2 \\ 0 & 1 & 1 \\ -1 & 1 & 1 \end{array}\right)$ should be $\left(\begin{array}{ccc} 1 & -1 & -1 \\ 0 & 1 & 1 \\ 0 & a-2 & 0 \end{array}\right)$ instead of $\left(\begin{array}{lll} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{array}\right)$. I wonder if this error is a bug in the RowReduce function.

In addition, sometimes it is necessary to deal with the following non square matrix equation:

A = {{1, -1, -1}, {2, a, 1}, {-1, 1, a}}; B = {{2, 2}, {1, 
   a}, {-a - 1, -2}}; 
Solve[MatrixRank[A] == 
    MatrixRank[Join[A, B, 2]], a, Reals]
  • 1
    @DanielLichtblau If it's not a bug I would argue, though, that the documentation does a pretty bad job at explaining this limitation. Would it be feasible for RowReduce to have a GenerateConditions option to at least be able to keep track of the conditions that that make the reduced form valid? – Sjoerd Smit Aug 20 '20 at 08:42
  • 2
    @SjoerdSmit (1) I don't think such an option is likely to be added but in theory it is feasible. One way to obtain such information is to augment the matrix with an identity matrix on the right (as though finding a matrix inverse as taught in linear algebra), then row reduce, then take denominators in the augmented section as nonvanishing conditions. – Daniel Lichtblau Aug 20 '20 at 14:20
  • 2
    @SjoerdSmit (2) See also this old response to a similar question, for adapting the ZeroTest option. – Daniel Lichtblau Aug 20 '20 at 14:22