Matrix Multiplication
Matrix multiplication is a fundamental operation in linear algebra where two matrices are combined to produce a third matrix. The process involves multiplying rows of the first matrix by columns of the second matrix and summing the results. Here’s a detailed explanation:
Preconditions for Matrix Multiplication
Matrix multiplication is only defined when the number of columns in the first matrix equals the number of rows in the second matrix.
- If matrix ( A ) is of size
(with ( m ) rows and ( n ) columns) and matrix ( B ) is of size
(with ( n ) rows and ( p ) columns), then their product ( AB ) will be a matrix ( C ) of size
.
How to Multiply Matrices
Given matrices ( A ) and ( B ):
![Rendered by QuickLaTeX.com [A = \begin{pmatrix}a_{11} & a_{12} & \dots & a_{1n} \a_{21} & a_{22} & \dots & a_{2n} \\vdots & \vdots & \ddots & \vdots \a_{m1} & a_{m2} & \dots & a_{mn}\end{pmatrix}, \quadB = \begin{pmatrix}b_{11} & b_{12} & \dots & b_{1p} \b_{21} & b_{22} & \dots & b_{2p} \\vdots & \vdots & \ddots & \vdots \b_{n1} & b_{n2} & \dots & b_{np}\end{pmatrix}]](https://i0.wp.com/science.awjunaid.com/wp-content/ql-cache/quicklatex.com-6946be762b197856647bdeabc22a46a1_l3.png?resize=580%2C109&ssl=1)
The product matrix ( C = AB ) is defined as:
C=c11c21⋮cm1c12c22⋮cm2……⋱…c1pc2p⋮cmp
Where each element
of the resulting matrix ( C ) is calculated as:
![]()
This means that the element
is the dot product of the ( i )-th row of matrix ( A ) and the ( j )-th column of matrix ( B ).
Example of Matrix Multiplication
Let’s multiply two matrices:
![]()
Here, ( A ) is a
matrix, and ( B ) is a
matrix. The resulting matrix ( C = AB ) will be a
matrix.
Let’s calculate each element of matrix ( C ):
:![Rendered by QuickLaTeX.com [c_{11} = (1 \times 7) + (2 \times 9) + (3 \times 11) = 7 + 18 + 33 = 58]](https://i0.wp.com/science.awjunaid.com/wp-content/ql-cache/quicklatex.com-adc7091813fc42300245276e22dc9c0f_l3.png?resize=416%2C19&ssl=1)
:![Rendered by QuickLaTeX.com [c_{12} = (1 \times 8) + (2 \times 10) + (3 \times 12) = 8 + 20 + 36 = 64]](https://i0.wp.com/science.awjunaid.com/wp-content/ql-cache/quicklatex.com-dd4f6c30ee92f3daddedd0073f69306e_l3.png?resize=425%2C19&ssl=1)
:![Rendered by QuickLaTeX.com [c_{21} = (4 \times 7) + (5 \times 9) + (6 \times 11) = 28 + 45 + 66 = 139]](https://i0.wp.com/science.awjunaid.com/wp-content/ql-cache/quicklatex.com-ebef63afecc5bf161bc2eff88ea9be45_l3.png?resize=434%2C19&ssl=1)
:![Rendered by QuickLaTeX.com [c_{22} = (4 \times 8) + (5 \times 10) + (6 \times 12) = 32 + 50 + 72 = 154]](https://i0.wp.com/science.awjunaid.com/wp-content/ql-cache/quicklatex.com-87e6c9fe34df3ac858e8c34958d25cf1_l3.png?resize=443%2C19&ssl=1)
So, the resulting matrix ( C ) is:
![]()
Properties of Matrix Multiplication
- Non-commutative: In general,
. The order in which matrices are multiplied matters. - Associative: Matrix multiplication is associative, meaning ( A(BC) = (AB)C ).
- Distributive: Matrix multiplication is distributive over addition, so ( A(B + C) = AB + AC ) and ( (A + B)C = AC + BC ).
- Identity Matrix: Multiplying any matrix by the identity matrix ( I ) (where ( I ) is a square matrix with 1’s on the diagonal and 0’s elsewhere) leaves the matrix unchanged:
. - Zero Matrix: Multiplying any matrix by a zero matrix results in a zero matrix.
Matrix multiplication is widely used in various fields, including computer graphics, physics, engineering, economics, and more. It forms the backbone of many algorithms and systems in linear algebra.
Discover more from Science blog by awjunaid
Subscribe to get the latest posts sent to your email.
