BTL200

Introduction: Part II

Summary

Introduction to the second half of BTL200

What is Linear Algebra

Why study Linear Algebra

Linear Equations

Solving Linear Equations

Matrix Notation

Gaussian Elimination

Introduction

About Myself

Electrical Engineer by trade

+20 years of experience in Software Development

Teaching this course for the first time!

Brazilian, Canadian, and French

Father of two little honey badgers tasmanian devils beautiful children

What we will Learn

Linear Algebra:

  Linear Equations

  Matrices and Determinants

  Vectors and Vector Spaces

  Eigenvalues and Eigenvectors

Delivery Method

Slight changes to addendum

Lectures will be in person

Blackboard will be used for assignments, for announcements, and for grading purposes

Course's website contains general info and slides

Evaluation

Two Activies (5%): Blackboard tests

    Each activity will be broken down in two parts

Two Quizzes (10%): in class pen-on-paper tests

One Final Exam (25%): in class pen-on-paper test

Your worst Quizz will be discarded!

What is Linear Algebra

Formal Definition

Linear algebra is the branch of mathematics concerning linear equations such as:

\[a_{1}x_{1} + a_{2}x_{2} + \ldots + a_{n}x_{n} = b_{1}\]

linear maps such as:

\[(x_{1}, x_{2} , \ldots x_{n}) \rightarrow a_{1}x_{1} + a_{2}x_{2} + \ldots + a_{n}x_{n} \]

and their representations in vector spaces and through matrices

Informal Definition

Study of dots, lines, and planes in space

Understand how to flip, rotate, and stretch shapes, etc

Simplify complex transformations into simpler ones

All boils down to vectors and matrices!

Linear vs non-linear

Linear equations can only have variables multiplied by constants and added together

The examples below are non-linear equations:

\[ax^{2} + bx + c = 0\]

\[ax + bxy = c\]

\[a\sin(x) + b\cos(y) = 0\]

Why Study Linear Algebra

Linear Algebra Applications

Computer Graphics: Transformation and rendering

Computer Vision: Image processing and object recognition

Machine Learning: Data representation and analysis

Game Development: Physics Simulations and animation

Linear Algebra Advantages

Provides a framework for understanding and solving problems in a structured and efficient way

Makes you a better thinker

Probably helps you grow taller, lose weight, and gain muscle!*

Linear Equations

Simple Equation

The equation \[ x = 5\]

corresponds to a point in a line

Another Simple Equation

The equation \[ ax = b\]

corresponds to another point: \[ x = b/a \]

Equation on two variables

The equation \[ x + y = 5\]

corresponds to a line in a plane

Another Equation on two variables

The equation \[ ax + by = c\]

corresponds to another line in a plane: \[ y = (c - ax)/b \]

Simple System of Equations

The system of equations \[\begin{aligned} x & = 5 \\ y & = 3 \end{aligned} \]

corresponds to a point in a plane

Simple System of Equations

The system of equations \[\begin{aligned} ax + by & = c \\ dx + ey & = f \end{aligned} \]

might correspond to a point in a plane*

System of Equations

Think of the number of variables as the number of dimensions!

With three variables, each equation represents a plane in a 3D space

With four variables, each equation represents a 3D space in a 4D space

General System of Equations

\[\begin{aligned} a_{11}x_{1} & + a_{12}x_{2} & + \cdots + & a_{1n}x_{n} & = b_{1} \\ a_{21}x_{1} & + a_{22}x_{2} & + \cdots + & a_{2n}x_{n} & = b_{2} \\ \vdots & + \vdots & + \cdots + & \vdots& = \vdots \\ a_{m1}x_{1} & + a_{m2}x_{2} & + \cdots + & a_{mn}x_{n} & = b_{m} \end{aligned} \]

Solving Linear Equation

Types of solutions

A system of equations might have:

  No solutions: 0

  A unique solution: 1

  Infinitely many solutions:

Operations

To solve a linear system, you can perform algebraic operations such as:

  Multiply an equation by a nonzero constant

  Interchange two equations

  Add a constant times one equation to another

Visual Representation

Example

Let's solve:

\[\begin{aligned} x + y + z & = 6 \\ x + 2y + 2z & = 11 \\ 2x + 3y - z & = 5 \end{aligned} \]

Matrix Notation

Matrix Notation

Linear systems can be represented in matrix notation

Each equation corresponds to a row in this matrix

Constants multiplying variables appear as columns

The right side appears as the last column

Example in Matrix Notation

\[\begin{bmatrix} 1 & 1 & 1 & 6\\ 1 & 2 & 2 & 11\\ 2 & 3 & -1 & 5 \\ \end{bmatrix}\]

Operations on Matrices

Using matrices, algebraic operations are rewritten as:

  Multiply a row by a nonzero constant

  Interchange two rows

  Add a constant times one row to another

Example

Let's rewrite the system below as a matrix:

\[\begin{aligned} 3x + y + 2z & = 8 \\ 2x + 5y - 2z & = 13 \\ x + y - z & = 1 \end{aligned} \]

Gauss-Jordan Elimination

Example Revisited

We have shown that:

\[\begin{aligned} x + y + z & = 6 \\ x + 2y + 2z & = 11 \\ 2x + 3y - z & = 5 \end{aligned} \]

Can be rewritten as ...

Example Revisited

\[\begin{aligned} x \phantom{+ y + z} & = 1 \\ \phantom{x +} y \phantom{+ z} & = 2 \\ \phantom{x + y + } z & = 3 \end{aligned} \]

which as a matrix shows as ...

Example Revisited as a Matrix

\[\begin{bmatrix} 1 & 0 & 0 & 1\\ 0 & 1 & 0 & 2\\ 0 & 0 & 1 & 3 \\ \end{bmatrix}\]

Which is a matrix in reduced row echelon form

Reduced Row Echelon Form

Rules for Reduced Row Echelon Form matrices:

  1. The first nonzero number in a row must be 1 (leading 1)

  2. All-zero rows are grouped at the bottom

  3. Leading 1s in lower rows must be at the right of the leading 1s in higher rows

  4. Each column with a leading 1 has zeros elsewhere

Reduced Row Echelon Form

If only the first three rules are met: Row Echelon Form

Systems in this form are trivial to be solved

Hence, to solve a particular system, one just needs to perform algebraic operations to put them in this form

This methodology is called Gauss-Jordan Elimination

Gauss-Jordan Elimination

  1. Locate the leftmost non-zero column

  2. Bring a non-zero to the top of said column

  3. Divide this row by its first non-zero column

  4. Eliminate other leading ones in the same column

  5. Cover the top matrix and restart the process with the remaining submatrix

  6. Begining with the last non-zero row, start working upwards

Example

Use the Gauss-Jordan Elimination method to solve the system:

\[\begin{aligned} x + y + z & = 9 \\ x + 2y + z & = 12 \\ 2x - 3y + 2z & = 3 \end{aligned} \]

Gaussian Elimination

Without the backwards component, this method is called Gaussian Elimination:

It puts the matrix in a row echelon form

It can be solved by back-substitution

Suggested Reading

Textbook: Sections 1.1 and 1.2

Exercises

  → Section 1.1: 1, 2, 5, 6, 9, 11, and 15

  → Section 1.2: 1, 3, 5, 6, 9, 10, 15, and 16