Lesson 29 - Quick Lesson on Matrices

Before we get into solving linear homogeneous systems using matrix methods, let's introduce some quick linear algebra.

Matrices

A matrix with m rows and n columns is denoted by A=[aij]m×n

A=|a11a12a1na21a22a2nam1am2amn|

A matrix is called a square matrix if the dimensions m=n.

Two matrices can be added or subtracted if they have the same number of rows and columns.
If A is a matrix and B is a matrix and both dimensions are equal, then

A+B=|a11+b11a12+b12a1n+b1na21+b21a22+b22a2n+b2na1m+b1ma2m+b2mamn|

In order to perform matrix multiplication, the inner dimensions of the matrices must agree. Meaning, if A has dimensions 2×1 and B has dimensions 1×2, then these matrices can be multiplied together because the inner dimensions agree. Technically, there are different types of matrix multiplications, such as matrix-matrix multiplication, scalar-matrix multiplication, scalar-vector multiplication, and others. To learn more, visit An Introduction to Linear Algebra.

Consider the matrices:

A=|123153322|B=|231|

Let's perform matrix multiplication. We perform this by multiplying each row in A by each element in the single row of B.

A×B=|(12)(23)(31)(12)(53)(31)(32)(23)(21)|A×B=|2632153662|

One additional important step. Remember when we talked about the inner dimensions? The dimensions here are 3×3 for matrix A and 3×1 for matrix B. When we talk about multiplying matrices, the inner dimensions will combine and this will give us the new dimensions for our product. So when we multiply a matrix with dimensions a×b with a matrix with dimensions b×c, the new dimensions become a×c.

In our example above, the dimensions for the product matrix will be 3×1. We will add each row in the matrix A×B in order to get to the correct dimensions, and this will give us the correct product matrix.

A×B=|2+6+(3)2+15+(3)6+6+2|A×B=|51014|

We can also represent a system of linear equations in matrix form:

Consider the linear system:              {3x1+4x2x3=12x1x2+x3=1x1x2x3=2

We can extract the coefficients of the linear system in what we call a coefficient matrix. Then, the leftover variables can be input into a 3×1 vector.

|341211111||x1x2x3|=|112|

Try For Yourself

A=|123522122|  B=|135121201|  C=|132|

Given matrices A, B, and C, find the following:

  1. A×C
  2. B×C
  3. A+B
  4. AB

Next Lesson: Lesson 30 - Matrix Methods for Linear Homogeneous Systems

Table of Contents: Table of Contents