Gradient

Courses

∇\nabla∇The maths behind AI0/72
π\piπMaths0/84
  • Data handling0/7
  • Matrices0/5
  • Derivatives0/5
  • Probability0/6
⋆\star⋆AI for everyone0/10
Γ\GammaΓGame theory0/49
py\texttt{py}pyPython for AI0/15
y^\hat{y}y^​Build your own AI0/15
All courses

Tuition

My tuitionOlympiad trackCompetitions

Practice

ProjectsAsk a questionTrain on a GPUExplorationsMaths StoriesUnsolved problemsPlaygroundScience labsMock testsOlympiad

Reference

GlossaryBlogDiscoveries
AAAMaths, module 11: Matrices, lesson 2 of 5

Matrix multiplication

Multiplying two matrices chains two transformations into one. The rule is rows times columns, and the shapes have to fit.

8 minute readOne thing to try6 questionsFree

Read the whole lesson free

Make a free account to read on, try the interactive parts, answer the 6 practice questions and keep your progress.

Create a free accountLog in

What this lesson covers

  • Entry (i,j)(i, j)(i,j) of ABABAB is row iii of AAA dotted with column jjj of BBB.
  • Shapes: (m×n)⋅(n×p)(m \times n) \cdot (n \times p)(m×n)⋅(n×p) gives (m×p)(m \times p)(m×p). The inner numbers must match.
  • ABABAB is usually not equal to BABABA.

More in Matrices

  1. 1Matrices move space
  2. 2Matrix multiplication
  3. 3Layers and non-linearity
  4. 4Transpose, identity and inverse
  5. 5Tensors and shapes