How do I multiply two matrices together?

In order to multiply two matrices together, you must first have that the number of columns in the first matrix must be equal to the the number of rows in the second matrix.

So if you wish to multiply matrix A and matrix B,

matrix A must have dimensions ( m x n ) whilst matrix B must have dimensions ​(​n ​x q) . Once you multiply these matrices, the new matrix formed will have dimension m xq​ .

(Note that m and q can be equal)

For example, matrix A can have dimension 3x2 and matrix B can have dimension 2x4 and so the new matrix will have dimension 3x4.

To multiply matrices, you take the first row of Matrix A and multiply its elements by the elements in the first column of Matrix B. You then take the first row of Matrix A and multiply its elements by the elements in the second column of Matrix B. You then keep repeating this process till you have multiplied the elements of the first row of Matrix A to the elements of  every single column of Matrix B.

You then take the second row of Matrix A and multiply its elements by the elements of the first column of Matrix B. You then take the second row of Matrix A and multiply it by the elements of the second column of Matrix B. You keep doing this till you have multiplied the second row of Matrix A by every single column of matrix B.

You then repeat this process for the third, fourth, fifth (and so on...) row of matrix A.  The following example should make this clear.


​Matrix A is ( A B )    and Matrix B is ( 1 2 3 4 )

                     ( C D )                                   ( 5 6 7 8) 

The dimension of A is 2x2 and the dimension of B is 2x4. Hence, the dimension of the new matrix shall be 2x4.

Using the above rules, it should be simple to follow that new matrix is:

[ (1a+5b)   (2a+6b)   (3a+7b)  (4a+8b) ​]

[ (​1c+5d  ​(​2c+6d)​   (3c+7d)   (4c+8d) ​]

Also note that matrix A multiplied by matrix B does not yield the same result as matrix B multiplied by matrix A. The order in which you multiply matrices matters.

Iretunde S. A Level Maths tutor, 13 Plus  Maths tutor, GCSE Maths tut...

2 months ago

Answered by Iretunde, an A Level Maths tutor with MyTutor

Still stuck? Get one-to-one help from a personally interviewed subject specialist


£20 /hr

Lewis M.

Degree: Biology (Masters) - Bristol University

Subjects offered: Maths, Biology


“About Me: I am a Biology student at Bristol University. I have always loved science and maths and I hope this will come across in my sessions! I have been invloved with tutoring for the majority of my school life, taking time out of ...”

£22 /hr

Abi R.

Degree: Engineering (Bachelors) - Exeter University

Subjects offered: Maths, Physics+ 3 more

Design & Technology
-Personal Statements-

“About me: I'm in my first year at the University of Exeter studying Mechanical Engineering. My favourite subjects are Maths & Science and my physics teacher is who inspired me to really love teaching others. He was great at using ana...”

£20 /hr

Raimonds B.

Degree: Architecture (Bachelors) - Bath University

Subjects offered: Maths, Physics


“I am a first year Architecture student, as well as a well experienced tutor. I have tutored GCSE and A Level Mathematics and Physics for over two years, and have 5 star reviews on First Tutors. I have an exam based approach to revision...”

MyTutor guarantee

About the author

£20 /hr

Iretunde S.

Degree: Mathematics with Economics (Bachelors) - LSE University

Subjects offered: Maths


“Top tutor from the renowned Russell university group, ready to help you improve your grades.”

MyTutor guarantee

You may also like...

Other A Level Maths questions

How do you integrate by parts?

What is the angle between the position vectors a and b, where a = (6i - j + 3k) and b = (-4i + 2j + 10k)?

Solve the equation; 4 cos^2 (x) + 7 sin (x) – 7 = 0, giving all answers between 0° and 360°.

How to solve the absolute-value inequalities?

View A Level Maths tutors


We use cookies to improve our service. By continuing to use this website, we'll assume that you're OK with this. Dismiss