public Matrix4x4 getInverseMatrix() {
		/*
		 * inverse matrix is given by A^(-1) = 1/det(A) * CT where CT is the
		 * transpond matrix of cofactors c(i,j) = (-1)^(i+j)*det(A(i,j))
		 * [source: "Principles of Interactive Computer Graphics",
		 * W.M.Newman/R.F.Sproull]
		 */

		double det = this.computeDeterminante();
		if (det == 0)
			// actually close to 0 should be considered, here just IS 0
			return null;

		// matrix of cofactors
		double[] cofactorMatrix = new double[16];
		int counter = 0;
		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 4; j++) {
				double[] matrix_ij = new double[9];
				int count = 0;
				for (int k = 0; k < 4; k++) {
					for (int l = 0; l < 4; l++) {
						if (k != i && l != j) {
							matrix_ij[count] = this.getMatrixEntry(k, l);
							count++;
						}
					}
				}
				Matrix3x3 mat_ij = new Matrix3x3(matrix_ij);
				cofactorMatrix[counter] = Math.pow(-1, (i + j))
						* mat_ij.computeDeterminante();
				counter++;
			}
		}

		Matrix4x4 coMatrix = new Matrix4x4(cofactorMatrix);
		double[] invMatrix = new double[16];
		counter = 0;

		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 4; j++) {
				invMatrix[counter] = (1 / det) * coMatrix.getMatrixEntry(j, i);
				counter++;
			}
		}

		return new Matrix4x4(invMatrix);
	}