Calculate the rank of the following matrices Question: Calculate the rank of the following matrices:
$A = \left( \begin{array}{cc} 1 & n \\ n & 1 \end{array} \right), n \in \mathbb{Z}$ and $B = \left( \begin{array}{ccc} 1 & x & x^{2} \\ 1 & y & y^{2} \\ 1 & z & z^{2} \end{array} \right)$,  $x,y,z \in \mathbb{R}$.
So the way I understand rank($A$), is the number of pivots in an echelon form of $A$. To put $A$ into echelon form I would subtract $n$ times the first row from the second row: $A \sim \left( \begin{array}{cc} 1 & n \\ n & 1 \end{array} \right) \sim \left( \begin{array}{cc} 1 & n \\ 0 & 1 - n^{2} \end{array} \right) \Rightarrow $rank$(A) = 2$. 
With $B$ I would have done pretty much the same thing, subtracting row 1 from both row 2 and row 3: $B \sim \left( \begin{array}{ccc} 1 & x & x^{2} \\ 1 & y & y^{2} \\ 1 & z & z^{2} \end{array} \right) \sim \left( \begin{array}{ccc} 1 & x & x^{2} \\ 0 & y - x & y^{2} - x^{2} \\ 0 & z - x & z^{2} - x^{2} \end{array} \right)$ (at this point I could multiply row 2 by $-(\frac{z-x}{y-x})$ and add it to row 3 which ends up being a long polynomial....) However, with both parts, I am pretty confident that it is not so simple and that I am missing the point of this exercise. Could somebody please help point me in the right direction?
 A: You seem to be assuming that because "$1-n^2$" doesn't look like $0$, then it cannot be zero. That is a common, but often fatal, mistake.
Remember that $n$ stands for some integer. Once you get to
$$A = \left(\begin{array}{cc}
1 & n\\
0 & 1-n^2
\end{array}\right),$$
you cannot just jump to saying there are two pivots: your next step would be to divide the second row by $1-n^2$ to make the second pivot, but whenever you divide by something, that little voice in your head should be whispering in your ear: "Wait! Are you sure you are not dividing by zero?" (remember, if you divide by zero, the universe explodes!). And the thing is, you aren't sure you are not dividing by zero. It depends on what $n$ is! So, your answer should be that it will be rank $2$  if $1-n^2\neq 0$, and rank $1$  if $1-n^2 = 0$. But you don't want the person who is grading/reading to have to figure out when that will happen. You want them to be able to glance at the original matrix, and then be able to immediately say (correctly) "Rank is 1" or "Rank is 2". So you should express the conditions in terms of $n$ alone, not in terms of some computation involving $n$. So your final answer should be something like "$\mathrm{rank}(A)=2$ if $n=\text{someting}$, and $\mathrm{rank}(A)=1$ if $n=\text{something else}$." 
The same thing happens with the second matrix: in order to be able to multiply by $-(\frac{z-x}{y-x})$, that little voice in your head will whisper "Wait! are you sure you are not dividing by zero?", which leads you to consider what happens when $y-x=0$. But more: even if you are sure that $y-x\neq 0$, that meddlesome little voice should be whispering "Wait! Are you sure you are not multiplying the row by zero?" (because, remember, multiplying a row by zero is not an elementary row operation). (And be careful: if you don't pay attention to that voice, it's going to start yelling instead of whispering...) So that means that you also need to worry about what happens when $z-x=0$. The answer on the rank of $B$, then, will depend on how $x$, $y$, and $z$ relate, and so your solution should reflect that.
A: For your first matrix, the rank could be 1 if $n=1$ or $n=-1$ (because there would only be one pivot column).  For you second example, the rank could be 1,2,or 3 depending on x,y, and z.  For instance, if $x=y=z$ there are only non-zero entries in the first row of the reduced matrix.  You may want to look at the invertible matrix theorem to help you with this second example.
http://www.ams.sunysb.edu/~yan2000/ams210_f2005/TheInvertibleMatrixTheorem.pdf
In particular, a square matrix has "full rank" iff it is invertible.  This makes your first question trivial.  For the second one, think about the values of $x,y,z$ that make the matrix singular, then classify these as rank 1 or 2.  Any combination of $x,y,z$ making the matrix invertible implies the resulting matrix has rank 3.
