#TI-Basic (TI-83 series), 28 27 28 bytes (62 characters)
TI-Basic (TI-83 series), 28 27 28 bytes (62 characters)
:Prompt [A] :{0→X :Matr►list(ref([A])ᵀ,L₁,X :not(max(abs(ᶫX Computes the row-echelon form of the matrix [A], stores its first row (to be discarded) in L₁ and its second row in ᶫX. Then max(abs(ᶫX will be zero if ᶫX consists only of zeroes, and a positive value otherwise, which not( changes to 1 if the matrix is rank one, 0 otherwise.
For a 1-row matrix, ᶫX is set to {0} and then doesn't get changed when we try to look at the nonexistent second row of the matrix.
-1 byte thanks to Scott Milner
+1 byte to fix dimension error for 1-row matrices. Turns out the Matr►list( command complains if you try to extract the second row from a matrix with only one row; however, if you try to extract the first and second row both from the matrix, it will fail silently.