Skip to content
masterclass Buddy

NumPy · Function

np.matmul

numpy.matmul computes the matrix product of two array-like inputs. It supports ordinary matrices, vectors, and broadcast stacks of matrices.

Last updated

Syntax

numpy.matmul(x1, x2, /, out=None, *, casting='same_kind', order='K', dtype=None, subok=True[, signature, axes, axis]) = <ufunc 'matmul'>

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • vecdot
  • matvec
  • vecmat
  • tensordot
  • einsum
  • dot

Source: numpy.matmul — NumPy v2.5 Manual. Checked 2026-11-03.