Glossary

Matrix multiplication

When multiplying two matrices, A and B, the elements of the rows in A are multiplied with corresponding elements in columns in B. As a result, the number of elements in a row of A should equal the number of elements in a column of B; by extension, the number of columns of A should equal the number of rows of B.

Matrix multiplication

in the figure above, the resulting matrix AB is computed one entry at a time. The values at the intersections marked with circles are:

AB12=(a11,a12)(b12,b22)=a11b12+a12b22AB33=(a31,a32)(b13,b23)=a31b13+a32b23

As another example, here is the product of a 2×2 square matrix A and a single column matrix (called a vector) B.

A=(abcd),B=(xy)

AB=(abcd)(xy)=(ax+bycx+dy)=(ax+bycx+dy)

Wikipedia