Engineering Programming (MATLAB/Python) · Problem type

Element-wise or matrix product

Use this for “A and B are both 3 × 3. Does NumPy’s A * B multiply entry by entry or as matrices?”

Sort

What does this line do with these sizes?
Tap a card, then tap its group.
In NumPy * works element by element; in MATLAB * is the matrix product.

Assumptions

•
MATLAB’s dotted operators, like A.*B and A.², work entry by entry; its plain * is the matrix product.
•
In NumPy, * works entry by entry and @ is the matrix product.
•
Entry by entry needs the same sizes; a matrix product needs A’s columns to equal B’s rows.
Topic check
See what you know: 5 questions on this topic
New questions each time. Pass to mark it complete.

Related lessons

© 2026 SME. All rights reserved.