Determinant of a 4x4 Matrix using Laplace's Expansion (hard)

Decomposition & Spectral Methods DS practice problem on Onlearn.

Difficulty: hard.

Topics: Understanding Determinant of a 4x4 Matrix using Laplace's Expansion (hard), Laplace Expansion, Minor Matrix, Cofactor, Recursive Base Case, Matrix Slicing, Linear Algebra, Algorithm Design, Numerical Methods, Programming Fundamentals, Mathematical Foundations, Matrix Algebra, Recursive Algorithms, Divide and Conquer Strategy, Computational Complexity Analysis, Floating-Point Arithmetic.

Write a Python function that calculates the determinant of a 4x4 matrix using Laplace's Expansion method. The function should take a single argument, a 4x4 matrix represented as a list of lists, and return the determinant of the matrix. The elements of the matrix can be integers or floating point numbers. Implement the function recursively to handle the computation of determinants for the 3x3 minor matrices.