Add == for matrix element

but the friend function seems to have problem.
so i just make everything public
Finish chap9 4