# Matrix Multiplication

Delve into the world of Matrix Multiplication with this comprehensive guide. You will gain in-depth understanding of pure maths applications, become conversant with the basics, and learn Matrix Multiplication step by step. This guide also explores Matrix Multiplication rules and variations, including multiplication by a vector and scalar. Further, it provides real-world examples and practical exercises to hone your skills. Equip yourself with essential knowledge and make Matrix Multiplication a breeze.

#### Create learning materials about Matrix Multiplication with our free learning app!

• Flashcards, notes, mock-exams and more
• Everything you need to ace your exams

## Understanding Matrix Multiplication in Pure Maths

You're about to dive into the exciting world of matrix multiplication, a fundamental operation within the field of pure mathematics. Matrix multiplication is uniquely defined to support various mathematical operations on matrices, which are rectangular arrays of numbers, symbols, or expressions.

Matrix multiplication is an operation that takes two matrices (usually known as a first matrix and second matrix) as inputs to produce a new matrix. The order of matrices is extremely important - multiplication of the first matrix by the second matrix is not necessarily equal to the second matrix multiplied by the first.

### The Basics of Matrix Multiplication

To get a solid hold on matrix multiplication, you first need to understand the requirements for performing this operation. Matrix multiplication is only defined when the number of columns in the first matrix matches the number of rows in the second matrix. Output, or the resultant matrix, is formed by performing specific calculations between the corresponding entries of the two matrices.

You have two matrices A and B. A is a 2x3 matrix (two rows and three columns) and B is a 3x2 matrix (three rows and two columns). You can multiply A by B, but not B by A. The product of A and B will be a 2x2 matrix because the outer dimensions (2 from A and 2 from B) determine the size of the resultant matrix.

#### How to do Matrix Multiplication: Step-by-Step Guide

Matrix multiplication can be approached in a systematic way. Let's break the steps down in a list format:

1. Verify that the number of columns in the first matrix is equal to the number of rows in the second matrix.
2. If the condition in step one is satisfied, proceed with the multiplication. If not, the matrices can't be multiplied together.
3. To populate each cell of the resultant matrix, multiply each element of a row from the first matrix by the corresponding element in a column of the second matrix, then add the results.

In code, this operation could be presented as follows:

def matrix_multiplication(A, B):
rows_A = len(A)
cols_A = len(A[0])
rows_B = len(B)
cols_B = len(B[0])

if cols_A != rows_B:
return "Incompatible matrices"

result_matrix = [[0 for row in range(cols_B)] for col in range(rows_A)]

for i in range(rows_A):
for j in range(cols_B):
for k in range(cols_A):
result_matrix[i][j] += A[i][k] * B[k][j]

return result_matrix


### Exploring Matrix Multiplication Rules

You've learnt the basics of how to do matrix multiplication, but now it's time to dig into the rules. Matrix multiplication adheres to specific rules and principles that set it apart from ordinary number multiplication.

Here are few key points to remember when working with matrix multiplication:
• Matrix multiplication is not commutative, meaning if you have two matrices A and B, generally, AB ≠ BA.
• Matrix multiplication is associative, meaning the order in which associative operations are performed does not matter. (AB)C = A(BC)
• Matrix multiplication is distributive over addition. A(B + C) = AB + AC and (B + C)A = BA + CA.

#### Special Considerations: Matrix Multiplication by Vector

When a matrix is multiplied by a vector, the operation becomes specifically interesting. A vector is essentially a matrix with just one column or just one row. The multiplication result depends on whether the vector is a row vector or a column vector.

The result of multiplying a matrix by a column vector is itself another column vector. In contrast, multiplying a matrix by a row vector produces a row vector. This transformation property makes matrix-vector multiplication an essential tool in a wide array of fields including computer graphics, where it is frequently used to implement transformations like scaling, rotation, and translation.

## Delving into Variations of Matrix Multiplication in Pure Maths

Matrix multiplication isn't a one-size-fits-all tool. There are variations of this operation that serve different purposes in various mathematical contexts. Two such examples include matrix multiplication with a scalar and the specific case of 2x2 matrix multiplication. Understanding these two cases will offer you a broader picture of matrix multiplication and its applicability in different mathematical scenarios.

### Getting to Know Matrix Multiplication with Scalar

You're already familiar with matrix multiplication involving two matrices, but what about when a matrix is multiplied by a single number or scalar? This operation is quite straightforward, but holds foundational importance in linear algebra and other disciplines that rely on matrix computations.

Matrix multiplication with a scalar involves multiplying every entry in a matrix by a single number (or scalar). The resulting matrix maintains the same dimensions as the original matrix, but all its entries are scaled by the multiplicative factor.

The formula for matrix and scalar multiplication can be written as follows:

$k \cdot A = k \begin{pmatrix} a_{11} & a_{12} & \ldots & a_{1n} \\ a_{21} & a_{22} & \ldots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \ldots & a_{mn} \end{pmatrix} = \begin{pmatrix} k \cdot a_{11} & k \cdot a_{12} & \ldots & k \cdot a_{1n} \\ k \cdot a_{21} & k \cdot a_{22} & \ldots & k \cdot a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ k \cdot a_{m1} & k \cdot a_{m2} & \ldots & k \cdot a_{mn} \end{pmatrix}$

Take a matrix A= $\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}$ and a scalar k=2. Then the scalar multiplication of A by k equals: $\begin{pmatrix} 2 & 4 \\ 6 & 8 \end{pmatrix}$

Regardless of their simplicity, matrix scalar multiplications remain a fundamental operation in vector spaces, physics, computer graphics and other related fields.

#### Detailed Look at Matrix Multiplication 2x2

Beyond its general form, matrix multiplication exhibits interesting properties when carried out on specific types of matrices, notably 2x2 matrices. A 2x2 matrix is the simplest type of matrix that can be multiplied with another matrix.

2x2 matrix multiplication involves multiplying two matrices of size 2x2 (two rows and two columns), and the resulting matrix will also be of size 2x2. The computation involves four steps and four corresponding elements in the result.

The formula for 2x2 matrix multiplication is given by:

$\begin{pmatrix} a & b \\ c & d \end{pmatrix} \times \begin{pmatrix} e & f \\ g & h \end{pmatrix} = \begin{pmatrix} a \cdot e + b \cdot g & a \cdot f + b \cdot h \\ c \cdot e + d \cdot g & c \cdot f + d \cdot h \end{pmatrix}$

This formula means that each element in the resultant 2x2 matrix is arrived at by performing specified calculations between the entries of the two original 2x2 matrices.

For example, let's take two 2x2 matrices A & B where: A= $\begin{pmatrix} 2 & 0 \\ 1 & 2 \end{pmatrix}$ and B= $\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}$ The resulting matrix C = A x B would be: C= $\begin{pmatrix} 2 & 4 \\ 7 & 10 \end{pmatrix}$

Firm knowledge of how to multiply 2x2 matrices serves as a stepping stone for understanding larger and more complex matrix multiplications. As the most straightforward nontrivial case, it sets the groundwork for understanding more complex matrix operations.

## Learning through Practical Application: Matrix Multiplication Examples

You've mastered the theory of matrix multiplication - now it's time to apply it. In the following sections, you'll have the chance to explore real-world applications of matrix multiplication and test your skills with practice problems. Seeing matrix multiplication at work in practical contexts will provide you with valuable insights into this mathematical operation's role in our everyday lives.

### Real-world Example of Matrix Multiplication

Even if it seems like matrix multiplication simply belongs in a math textbook, it forms the basis of many real-world situations. From computer graphics to physics, data science to economics, matrix multiplication serves as an essential tool. One fascinating application can be found in the field of transportation—specifically in calculating flight routes and paths.

In the world of transportation, matrix multiplication is used to determine the shortest routes or paths from one point to another. This is often defined in a graph theory context, where cities are vertices, and paths between cities are edges. The adjacency matrices are multiplied to determine paths of certain lengths.

Imagine an airline network with three cities A, B, and C. The cities are connected to each other by direct flights in both directions. The connections can be represented in binary form where a 1 represents a direct flight and 0 lacks a flight. For instance, the direct flights can be shown in an adjacency matrix A such as: $\begin{pmatrix} 0 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 & 0 \end{pmatrix}$ Now suppose a person is in city A. To find multiple flights (two legs) paths from city A, one would multiply the adjacency matrix by itself to get matrix A². If matrix A was multiplied twice, it would list all the paths of length two in the network, showing possible flights: $\begin{pmatrix} 0 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 & 0 \end{pmatrix}$ x $\begin{pmatrix} 0 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 & 0 \end{pmatrix}$ = $\begin{pmatrix} 2 & 1 & 1 \\ 1 & 2 & 1 \\ 1 & 1 & 2 \end{pmatrix}$ So from matrix A², one can see that there are two paths of length two from city A to both cities B and C.

The graph theoretical approach to matrix multiplication in transportation is only one of many real-world applications. Similar approaches are used in social network analysis, power grid stability, computer network design, and much more. Understanding matrix multiplication and how to implement it offers a broad set of tools for tackling these complicated, real-world scenarios.

#### Practice Problems: Boost Your Matrix Multiplication Skills

Now let's put your understanding of matrix multiplication to the test. Working through practice problems is one of the best ways to truly grasp the concept. You'll find exercises that will help bolster your matrix multiplication abilities and reinforce the lessons learnt.

Take the matrices below: Matrix A= $\begin{pmatrix} 2 & 3 \\ 0 & 1 \end{pmatrix}$ and Matrix B= $\begin{pmatrix} 1 & 4 \\ 2 & 0 \end{pmatrix}$ Using your knowledge of matrix multiplication, compute A x B and B x A.

Now consider a scalar multiplication scenario: Take a matrix C= $\begin{pmatrix} 1 & 6 \\ -1 & 0 \end{pmatrix}$ and a scalar d=3. Calculate the matrix multiplication of C by d.

These problems offer a nuanced view of matrix multiplication and will strengthen your comprehension of this fundamental mathematical operation. Don't forget to apply the principles and rules you've learnt so far about matrix multiplication while solving these exercises.

## Matrix Multiplication - Key takeaways

• Matrix Multiplication is an operation that takes two matrices as inputs to produce a new matrix, with the order of matrices being extremely important.
• Matrix Multiplication is only defined when the number of columns in the first matrix matches the number of rows in the second matrix.
• Matrix Multiplication rules include: non-commutative property where AB ≠ BA; associative property where (AB)C = A(BC); and distributivity over addition such as A(B + C) = AB + AC and (B + C)A = BA + CA.
• In Matrix Multiplication by a Vector, the outcome depends on whether the vector is a row vector or a column vector, with matrix by a column vector resulting in another column vector, and multiplication by a row vector producing a row vector.
• Matrix Multiplication with a Scalar involves multiplying every entry in a matrix by a single number or scalar, resulting in a matrix of the same dimensions but all its entries are scaled by the multiplicative factor.
• 2x2 Matrix Multiplication involves multiplying two matrices of size 2x2, and the resultant matrix will also be of size 2x2.
• Matrix Multiplication has practical applications in computer graphics, physics, data science, economics, and transportation, particularly in calculating flight routes and paths.

#### Flashcards in Matrix Multiplication 12

###### Learn with 12 Matrix Multiplication flashcards in the free StudySmarter app

We have 14,000 flashcards about Dynamic Landscapes.

What are the steps to perform matrix multiplication in mathematics?
Firstly, ensure that the number of columns in the first matrix equals the number of rows in the second. For each cell in the result matrix, calculate the dot product of the corresponding row from the first matrix and column from the second. Repeat this process until all cells are filled. This is the product matrix.
Can you multiply any two matrices together in matrix multiplication?
No, you can't multiply any two matrices together. The number of columns in the first matrix must be equal to the number of rows in the second matrix for multiplication to be possible.
What is the importance of the order in matrix multiplication?
The order in matrix multiplication is vital because it is not commutative. Multiplying matrix A by matrix B (AB) can yield a result different from multiplying matrix B by matrix A (BA). Also, one multiplication may be defined while the other is not.
What are the practical applications of matrix multiplication in real life scenarios?
Matrix multiplication is used in various real-life scenarios including computer graphics, physics, and economics for transformation, rotation and scaling of images, solving systems of linear equations, and predicting economic growth, respectively.
What are the rules for the sizes of matrices in matrix multiplication?
For matrix multiplication, the number of columns in the first matrix must be equal to the number of rows in the second matrix. For instance, a matrix of size 'm x n' can multiply a matrix of size 'n x p' resulting in a matrix of size 'm x p'.

## Test your knowledge with multiple choice flashcards

What is matrix multiplication in pure maths?

What are the requirements for matrix multiplication?

What are the basic rules for matrix multiplication?

StudySmarter is a globally recognized educational technology company, offering a holistic learning platform designed for students of all ages and educational levels. Our platform provides learning support for a wide range of subjects, including STEM, Social Sciences, and Languages and also helps students to successfully master various tests and exams worldwide, such as GCSE, A Level, SAT, ACT, Abitur, and more. We offer an extensive library of learning materials, including interactive flashcards, comprehensive textbook solutions, and detailed explanations. The cutting-edge technology and tools we provide help students create their own learning materials. StudySmarter’s content is not only expert-verified but also regularly updated to ensure accuracy and relevance.

##### StudySmarter Editorial Team

Team Matrix Multiplication Teachers

• Checked by StudySmarter Editorial Team