Finding number of pivots when matrix includes variables Suppose we have the following matrix: \begin{equation*}
A = 
\begin{pmatrix}
1 & 1 & t \\
1 & t & 1 \\
t & 1 & 1
\end{pmatrix}
\end{equation*}
Discuss the number of pivots based on the value of t. 
What I did is reduce is a little bit so it becomes more "readable". 
First attempt I reduced it to:
\begin{equation*}
A' = 
\begin{pmatrix}
1-t & 1 & t-1 \\
0 & t-1 & 1-t \\
t & 2-t & t
\end{pmatrix}
\end{equation*}
Row operations used (in order): 
-R1+R2->R2
-R3+R1->R1
-R2+R3->R3
My question: is there another way to do this directly? and is my answer correct?
Which lead me to when t=1 or t=0 then number of pivots=1 else, number of pivots=2
 A: I find that the nicest approach is to row-reduce as usual. If at any point we are forced to divide by an expression involving $t$, break the problem into cases.
In particular, 
$$
\pmatrix{1&1&t\\1&t&1\\t&1&1} \to 
\begin{cases}
R_2 - R_1 \to R_2\\R_3 - tR_1 \to R_3
\end{cases} \to
\pmatrix{1&1&t\\
0&t-1&1-t\\
0&1-t & 1-t^2}
$$
To get a leading $1$ in the second column, I would need to divide by $t-1$. So, I consider two cases: in the case where $t = 1$, it's clear that we have only one pivot. In the case where $t \neq 1$, I can divide both $R_2$ and $R_3$ by $t-1$ to get
$$
\pmatrix{
1&1&t\\
0&1&-1\\
0&-1&-t-1
}
$$
Applying the step $R_3 \to R_3 + R_2$ yields
$$
\pmatrix{1&1&t\\0&1&-1\\0&0&-t-2}.
$$ 
We are now forced to divide by $-t-2$, so consider two cases. If $t = -2$, then we have two pivots. Otherwise, divide to find that we have three pivots.
So, we have one pivot if $t = 1$, two pivots if $t = -2$, and three pivots otherwise.
A: This answer assumes that you are applying Gaussian elimination with partial pivoting to the matrix.  In this case, the number of pivots first of all depend on $|t|$.  If $|t|\le 1$, no pivot is required for  processing the first column.  On the other hand, if $|t| \gt 1$, you will need to swap the last row and the first row (one pivot) before zeroing the first column below the main diagonal.

For the case $|t|\le 1$, Gaussian elimination applied to the first column produces
$$
  \begin{pmatrix}
  1 & 1 &  t\\
  1 & t & 1\\
  t & 1 & 1
  \end{pmatrix}
  \rightarrow
  \begin{pmatrix}
  1 & 1 &  t\\
  0 & t-1 & 1-t\\
  0 & 1-t & 1-t^2
  \end{pmatrix}
$$
So no pivot is required for the second column since $|t-1| = |1-t|$.  So in the case $|t|\le 1$, zero pivots are required.  


The case $|t|\gt 1$ is a little trickier.  Pivoting and zeroing the first column below the main diagonal produces
$$
  \begin{pmatrix}
  1 & 1 &  t\\
  1 & t & 1\\
  t & 1 & 1
  \end{pmatrix}
  \rightarrow
  \begin{pmatrix}
  t & 1 & 1\\
  1 & t & 1\\
  1 & 1 & t
  \end{pmatrix}
  \rightarrow
  \begin{pmatrix}
  t & 1 & 1\\
  0 & t-1/t & 1-1/t\\
  0 & 1-1/t & t-1/t
  \end{pmatrix}

$$
So a second pivot is required only if $|1-1/t| > |t-1/t|$.  For $|t|\gt 1$, this inequality is only satisfied
for $-2\lt t \lt -1$. 

A: Instead of performing Gaussian elimination, we can use the fact that the number of pivots is equal to the rank of the matrix, which can be determined by examining its various minors: the rank of a matrix is equal to the maximum order of its non-vanishing minors.  
When $\det A\ne0$, the matrix has full rank, which corresponds to three pivots in its reduced form. You can compute this determinant directly, or take a short cut by using eigenvalues of a related matrix: by swapping the first and last rows, which doesn’t affect the determinant, we get $$\begin{bmatrix}t&1&1\\1&t&1\\1&1&t\end{bmatrix} = (t-1)I+\begin{bmatrix}1&1&1\\1&1&1\\1&1&1\end{bmatrix}.$$ The eigenvalues of this matrix are $t+2$, with multiplicity one, and $t-1$, with multiplicity two, so $\det A=(t+2)(t-1)^2$. Unless $t=-2$ or $t=1$, then, there will be three pivots.  
Now we look at the $2\times 2$ minors for the cases in which the determinant vanishes. It’s easy to see that they’re all of the form $\pm(1-t)$ or $1-t^2$. When $t=-2$, none of them vanish, so the matrix will be rank-two: two pivots. When $t=1$, all of the $2\times2$ minors vanish, but the matrix isn’t zero, so it’s rank-one in that case: one pivot. In fact, we’re back to that matrix of all ones that appeared earlier.
