According to help pages for intersect function: returns the vector of common values of two vectors but this function can work with matrices as input arguments.