Matrix Calculations

Master fundamental matrix operations: scalar multiplication, addition, subtraction, and matrix multiplication

Introduction to Matrix Arithmetic

Just like regular numbers, matrices can be combined using arithmetic operations. However, matrix operations follow specific rules that differ from ordinary arithmetic. Understanding these rules is essential for working with systems of linear equations and linear transformations.

To distinguish between scalars (ordinary numbers) and matrices, we use:

  • Lowercase letters for scalars: \(a, b, x, y\)
  • Uppercase letters for matrices: \(A, B, X, Y\)
Key Point:

Matrix operations are carefully defined so that they can be used to represent and solve systems of linear equations efficiently.

Scalar Multiplication

Definition and Rule

Scalar Multiplication:

To multiply a matrix by a scalar (ordinary number), multiply each element in the matrix by that scalar.

Scalar Multiplication Formula:
If \(A = [a_{ij}]\) and \(c\) is a scalar, then \(cA = [c \cdot a_{ij}]\)

Example: Scalar Multiplication

Multiply Matrix by 2.5
\(\displaystyle 2.5 \cdot \begin{bmatrix}1 & -3 \\ 4 & 7 \end{bmatrix} = \begin{bmatrix}2.5 & -7.5 \\ 10 & 17.5 \end{bmatrix}\)

Process:

  • \(2.5 \times 1 = 2.5\)
  • \(2.5 \times (-3) = -7.5\)
  • \(2.5 \times 4 = 10\)
  • \(2.5 \times 7 = 17.5\)

Matrix Addition and Subtraction

Requirements for Addition/Subtraction

Conformable Matrices:

For matrices to be added or subtracted, they must be conformable—they must have the same dimensions (same number of rows and columns).

Addition and Subtraction Rules

Operation Rules:

To add or subtract matrices, combine the corresponding elements in each position.

Addition Formula:
\(\displaystyle [A + B]_{ij} = a_{ij} + b_{ij}\)

Subtraction Formula:
\(\displaystyle [A - B]_{ij} = a_{ij} - b_{ij}\)

Example: Matrix Addition

Add Two 2×3 Matrices
\(\displaystyle \begin{bmatrix}1 & 2 & -3 \\ -4 & 5 & 6\end{bmatrix} + \begin{bmatrix}2 & 4 & 6 \\ 3 & 5 & 7\end{bmatrix}\)

Add corresponding elements:

\(\displaystyle = \begin{bmatrix}1+2 & 2+4 & -3+6 \\ -4+3 & 5+5 & 6+7\end{bmatrix} = \begin{bmatrix}3 & 6 & 3 \\ -1 & 10 & 13\end{bmatrix}\)
Important:

A 2×3 matrix cannot be added to a 3×2 matrix because they have different dimensions. The matrices must have identical dimensions.

Matrix Multiplication

Conformability for Multiplication

Multiplication Requirement:

Matrix multiplication \(A \times B\) is only possible if the number of columns in \(A\) equals the number of rows in \(B\).

If \(A\) is \(p \times q\) and \(B\) is \(q \times r\), then \(C = A \times B\) is \(p \times r\).

Multiplication Rule

How to Multiply:

The element in row \(i\) and column \(j\) of the product is calculated by:

Multiplying each element in row \(i\) of the first matrix by the corresponding element in column \(j\) of the second matrix, then summing all these products.

Multiplication Formula (Dot Product):
\(\displaystyle [C]_{ij} = \sum_{k=1}^{q} a_{ik} \cdot b_{kj}\)

Example 1: Simple Row × Column

Multiply a Row Vector by a Column Vector
\(\displaystyle \begin{bmatrix}1 & 2 & 3 \end{bmatrix} \cdot \begin{bmatrix}2 \\ -1 \\ 1\end{bmatrix}\)

Calculation:

\(\displaystyle = (1)(2) + (2)(-1) + (3)(1) = 2 - 2 + 3 = 3\)

Result: A single number (1×1 matrix) = 3

Example 2: Full Matrix Multiplication

Multiply a 2×3 Matrix by a 3×4 Matrix
\(\displaystyle A = \begin{bmatrix}1 & 2 & 3 \\ -1 & 4 & 5\end{bmatrix} \quad B = \begin{bmatrix}2 & 3 & -4 & 5 \\ -1 & 0 & -1 & 3 \\ 1 & 2 & 3 & 4 \end{bmatrix}\)

Result is 2×4:

\(\displaystyle C = AB = \begin{bmatrix}3 & 9 & 3 & 23 \\ -1 & 7 & 15 & 27 \end{bmatrix}\)

First element calculation (row 1, column 1):

\(\displaystyle c_{11} = (1)(2) + (2)(-1) + (3)(1) = 2 - 2 + 3 = 3\)

Second element calculation (row 1, column 2):

\(\displaystyle c_{12} = (1)(3) + (2)(0) + (3)(2) = 3 + 0 + 6 = 9\)

Properties of Matrix Operations

Property Addition Multiplication
Commutative \(A + B = B + A\) \(AB \neq BA\) (generally)
Associative \((A + B) + C \)\(= A + (B + C)\) \((AB)C = A(BC)\)
Distributive \(A(B + C)\)\( = AB + AC\)
Zero Element \(A + O = A\) \(AI = A\)
Not Commutative:

Matrix multiplication is NOT commutative. In general, \(AB \neq BA\). This is one of the most important differences from regular number multiplication.

Tips for Matrix Calculations

Check Dimensions First
Always verify matrices have compatible dimensions before attempting operations
Scalar Multiplication is Simple
Multiply every element by the scalar—straightforward operation
Use a Systematic Approach
For matrix multiplication, systematically compute row-column products
Remember Order Matters
\(AB\) and \(BA\) are generally different; order of multiplication is crucial

Key Points to Remember

  • Use lowercase letters for scalars and uppercase for matrices
  • Scalar multiplication: multiply each element by the scalar
  • Addition/Subtraction: matrices must have identical dimensions
  • Add/Subtract: combine corresponding elements
  • Matrix multiplication: columns of first matrix must equal rows of second
  • Each element of product is a dot product of row and column
  • Matrix multiplication is associative and distributive but NOT commutative
  • Identity matrix \(I\) acts like the number 1 in multiplication: \(AI = A\)
  • Zero matrix \(O\) acts like the number 0 in addition: \(A + O = A\)






Is this page helpful?            
Thank you for your feedback!

Sorry about that

How can we improve it?