add determinat checking singularity of square matrix