Transpose and inverse of a matrix
The transpose Aᵀ arises by swapping rows and columns. The inverse A⁻¹ is the matrix that gives the identity matrix when multiplied by A. It exists only if the determinant is not zero. Regression uses (XᵀX)⁻¹.
Example: A = [[2, 1], [1, 1]] has determinant 1 and inverse [[1, -1], [-1, 2]]. Their product is the identity matrix.
Caution: If columns are linearly dependent (collinearity), the determinant is zero and the inverse does not exist.