Finding pivots of a matrix with symbols

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!

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.

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.

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