implemented eigenvector formula using cofactors