Added equal functions to matrix and vector