Are the necessary and sufficient conditions for matrix equivalence and matrix similarity the same rank?

Are the necessary and sufficient conditions for matrix equivalence and matrix similarity the same rank?

If a and B are both real symmetric matrices, then a and B are similar if and only if a and B have the same eigenvalues. In addition, if there is an invertible matrix P such that (...)