Maths for ML / Notation

A−1\mathbf{A}^{-1}

matrix inverse

Linear algebraIntermediate

Say it “A inverse”

The matrix that undoes A: A⁻¹A = I. Only exists for square, non-singular matrices.

Example

w=(X⊤X)−1X⊤y\mathbf{w} = (\mathbf{X}^{\top}\mathbf{X})^{-1}\mathbf{X}^{\top}\mathbf{y}

Closed-form linear regression.

In code

np.linalg.inv(A)  # prefer np.linalg.solve
torch.linalg.inv(A)

Where you’ll see it in ML

Closed-form solutions, Gaussian processes, whitening.

Don’t confuse it with

Lessons that use it

← All 94 symbols