1
$\begingroup$

The RowReduce function of MMA can not effectively reduce the matrix with parameters to the 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)$.

Moreover, MMA also lacks a built-in function that transforms a symbol matrix into the simplest type through elementary row and column transformations.

How to write these custom functions which are widely used in linear algebra? If you can, I also need a user-defined function to judge the rank of the symbol matrix (output the discussion results according to the variable value range).

In addition, I don't know if the simplest form (it is obtained by elementary row transformation and column transformation) of a symbolic matrix is the same as Smith transformation.

A = {{1, 2, a}, {1, 3, 0}, {2, 7, -a}};
B = {{1, a, 2}, {0, 1, 1}, {-1, 1, 1}};
Control`PCS`SmithForm[A, a]
Control`PCS`SmithForm[B, a]

But the Smith canonical form of matrix A is independent of a, which is a little different from the simplest form of matrix A.

$\endgroup$
2
  • 1
    $\begingroup$ Read this answer and use the LUDecomposition technique there. This gives me: {{1, a, 2}, {0, 1, 1}, {0, 0, 2 - a}}. I also looked around for a ResourceFunction and found these, though they don't solve your problem directly: rsb = ResourceFunction["RowSpaceBasis"] csb = ResourceFunction["ColumnSpaceBasis"]; pvc = ResourceFunction["PivotColumns"]; $\endgroup$ – flinty Aug 4 '20 at 22:55
  • $\begingroup$ @flinty Thank you very much, but ResourceFunction["RowSpaceBasis"][{{1, a, 2}, {0, 1, 1}, {-1, 1, 1}}] still returns an identity matrix, which is not the row simplest form of matrix {{1, a, 2}, {0, 1, 1}, {-1, 1, 1}}. $\endgroup$ – A little mouse on the pampas Aug 4 '20 at 23:06

Your Answer

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

Browse other questions tagged or ask your own question.