Group Abstract Group Abstract

Message Boards Message Boards

0
|
255 Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Finding pivots of a matrix with symbols

Posted 19 days ago

I want to find the pivots of a simple matrix a = {{2, -1, -1}, {-1, 2, -1}, {-1, -1, 2 + c}} using

RowReduce[a]//MatrixForm

To my surprise, it returns an identity matrix, which doesn't appear to be right. Does anyone know how to get all the correct pivots? Thanks much!

POSTED BY: Xiangyang Zhou
3 Replies

Not clear but possibly you want to triangularize the matrix withpout normalizing pivot positions? If so then the Wolfram Function Repository function to triangularize a matrix will handle this, For input matrix mat it returns an upper triangular matrix red and a conversion matrix mult such that mult . mat = red.

mat = {{2, -1, -1}, {-1, 2, -1}, {-1, -1, 2 + c}};
{red, mult} = ResourceFunction["UpperTriangularDecomposition"][mat]

(* {{{-1, 2, -1}, {0, -3, 3}, {0, 0, -3 c}}, {{0, 1, 0}, {-1, -2, 0}, {-3, -3, -3}}} *)

Check:

mult . mat - red // Expand

(* Out[111]= {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}} *)

The symbolic pivot in this case is -3 c.

POSTED BY: Daniel Lichtblau
Posted 17 days ago

Exactly what I'm trying to do. Thanks much!

POSTED BY: Xiangyang Zhou

The documentation on RowReduce states that

By default, symbolic expressions are considered nonzero

and it gives examples on how to catch exceptions with symbolic matrices.

POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard