A={{1,2,1,0},{0,1,2,1},{2,3,0,-1},{1,0,-3,-2},{3,5,3,1}};
MatrixForm[RowReduce[A]]
MatrixRank[A]