Finding the rank of a matrix (a.k.a a linear function) can be done in polynomial time (). Finding the rank of a tensor is NP-complete over a finite field, and NP-hard over the rational numbers.