What are the dimension and conformability rules for multiplying two matrices?

Quick Overview

Asks when two matrices can be multiplied and what shape their product has. Tests whether you can explain the conformability rule from the definition of a single matrix entry and reason about why the order of the factors matters.

What are the dimension and conformability rules for multiplying two matrices?

Role: Data Scientist

Category: Statistics & Math

Difficulty: easy

Interview Round: Other

What are the dimension and conformability rules for multiplying two matrices? ```hint Start from one entry Write out how a single entry of the product is computed and see what that requires of the shapes of the two matrices. ``` ### What a Strong Answer Covers - The condition on the two shapes for the product to exist - The shape of the result - Why the condition follows from how each entry is computed - What swapping the order does to whether the product exists and what it equals ### Follow-up Questions - Given A of size 10×100, B of size 100×5 and C of size 5×50, in which order would you compute ABC, and why? - What is the shape of $(AB)^\top$, and how does it relate to $A^\top$ and $B^\top$? - In NumPy, how do `A @ B` and `A * B` differ, and what happens when one operand is a 1-D array?

Overview: Asks when two matrices can be multiplied and what shape their product has. Tests whether you can explain the conformability rule from the definition of a single matrix entry and reason about why the order of the factors matters.

Nov 24, 2026
easyData ScientistOtherStatistics & Math
0
0

What are the dimension and conformability rules for multiplying two matrices?

What a Strong Answer Covers Guidance

  • The condition on the two shapes for the product to exist
  • The shape of the result
  • Why the condition follows from how each entry is computed
  • What swapping the order does to whether the product exists and what it equals

Follow-up Questions Guidance

  • Given A of size 10×100, B of size 100×5 and C of size 5×50, in which order would you compute ABC, and why?
  • What is the shape of (AB)⊤(AB)^\top , and how does it relate to A⊤A^\top and B⊤B^\top ?
  • In NumPy, how do A @ B and A * B differ, and what happens when one operand is a 1-D array?