How can I tell whether two matrices can be multiplied in a particular order?
Quick answer
Write each matrix’s dimensions as rows × columns. For a product AB, the number of columns in A must equal the number of rows in B; those matching numbers are the inside dimensions. The result has the number of rows in A and columns in B. Check the reversed product separately: BA may be undefined, or it may be defined but have a different value.
The question, the details, the next step.
A practical checklist
Write each matrix’s dimensions in rows × columns order.
Name the product order explicitly, such as AB or BA.
Compare the first matrix’s columns with the second matrix’s rows.
If they match, record the result size using the first matrix’s rows and second matrix’s columns.
Check the reversed order separately; do not assume its product exists or has the same entries.
A few more useful answers
Which dimensions are the inside dimensions?
For AB, they are the column count of A and the row count of B. They must match for AB to be defined. [S1]
How do I know the size of a defined product?
Use the outside dimensions: the rows of the first matrix and the columns of the second. For example, a defined (3 × 4)(4 × 2) product is 3 × 2. [S1]
Does a valid dimension check mean AB equals BA?
No. It only establishes whether each order is defined and the dimensions of its result. Even if both orders are possible, their entries can differ. [S1]
Sources
References used for this guide.
- [S1] OpenStax Algebra and Trigonometry: Matrix Products and Dimensions openstax.org · Checked
