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=|a11a12…a1na21a22…a2n⋮⋮⋱⋮am1am2…amn|

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+b12…a1n+b1na21+b21a22+b22…a2n+b2n⋮⋮⋱⋮a1m+b1ma2m+b2m…amn|

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=|123−15332−2|B=|23−1|

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=|(1⋅2)(2⋅3)(3⋅−1)(−1⋅2)(5⋅3)(3⋅−1)(3⋅2)(2⋅3)(−2⋅−1)|A×B=|26−3−215−3662|

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+4x2−x3=−12x1−x2+x3=1x1−x2−x3=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.

|34−12−111−1−1||x1x2x3|=|−112|

Try For Yourself

A=|1235−22122|  B=|135−12120−1|  C=|1−32|

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

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

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

Table of Contents: Table of Contents