Complete linear algebra: theory and implementation in code
4.7 (2,410 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
15,491 students enrolled

Complete linear algebra: theory and implementation in code

Learn concepts in linear algebra and matrix analysis, and implement them in MATLAB and Python.
4.7 (2,410 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
15,491 students enrolled
Created by Mike X Cohen
Last updated 8/2020
English [Auto], Italian [Auto], 1 more
  • Polish [Auto]
Current price: $23.99 Original price: $34.99 Discount: 31% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 33 hours on-demand video
  • 14 articles
  • 14 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Understand theoretical concepts in linear algebra, including proofs
  • Implement linear algebra concepts in scientific programming languages (MATLAB, Python)
  • Apply linear algebra concepts to real datasets
  • Ace your linear algebra exam!
  • Apply linear algebra on computers with confidence
  • Gain additional insights into solving problems in linear algebra, including homeworks and applications
  • Be confident in learning advanced linear algebra topics
  • Understand some of the important maths underlying machine learning
  • * Manually corrected closed-captions *
  • Basic understanding of high-school algebra (e.g., solve for x in 2x=5)
  • Interest in learning about matrices and vectors!
  • (optional) Computer with MATLAB, Octave, or Python (or Jupyter)

You need to learn linear algebra!

Linear algebra is perhaps the most important branch of mathematics for computational sciences, including machine learning, AI, data science, statistics, simulations, computer graphics, multivariate analyses, matrix decompositions, signal processing, and so on.

You need to know applied linear algebra, not just abstract linear algebra!

The way linear algebra is presented in 30-year-old textbooks is different from how professionals use linear algebra in computers to solve real-world applications in machine learning, data science, statistics, and signal processing. For example, the "determinant" of a matrix is important for linear algebra theory, but should you actually use the determinant in practical applications? The answer may surprise you, and it's in this course!

If you are interested in learning the mathematical concepts linear algebra and matrix analysis, but also want to apply those concepts to data analyses on computers (e.g., statistics or signal processing), then this course is for you! You'll see all the maths concepts implemented in MATLAB and in Python.

Unique aspects of this course

  • Clear and comprehensible explanations of concepts and theories in linear algebra.

  • Several distinct explanations of the same ideas, which is a proven technique for learning.

  • Visualization using graphs, numbers, and spaces that strengthens the geometric intuition of linear algebra.

  • Implementations in MATLAB and Python. Com'on, in the real world, you never solve math problems by hand! You need to know how to implement math in software!

  • Beginning to intermediate topics, including vectors, matrix multiplications, least-squares projections, eigendecomposition, and singular-value decomposition.

  • Strong focus on modern applications-oriented aspects of linear algebra and matrix analysis.

  • Intuitive visual explanations of diagonalization, eigenvalues and eigenvectors, and singular value decomposition.

  • Improve your coding skills! You do need to have a little bit of coding experience for this course (I do not teach elementary Python or MATLAB), but you will definitely improve your scientific and data analysis programming skills in this course. Everything is explained in MATLAB and in Python (mostly using numpy and matplotlib; also sympy and scipy and some other relevant toolboxes).

Benefits of learning linear algebra

  • Understand statistics including least-squares, regression, and multivariate analyses.

  • Improve mathematical simulations in engineering, computational biology, finance, and physics.

  • Understand data compression and dimension-reduction (PCA, SVD, eigendecomposition).

  • Understand the math underlying machine learning and linear classification algorithms.

  • Deeper knowledge of signal processing methods, particularly filtering and multivariate subspace methods.

  • Explore the link between linear algebra, matrices, and geometry.

  • Gain more experience implementing math and understanding machine-learning concepts in Python and MATLAB.

Why I am qualified to teach this course:

I have been using linear algebra extensively in my research and teaching (in MATLAB and Python) for many years. I have written several textbooks about data analysis, programming, and statistics, that rely extensively on concepts in linear algebra. 

So what are you waiting for??

Watch the course introductory video and free sample videos to learn more about the contents of this course and about my teaching style. If you are unsure if this course is right for you and want to learn more, feel free to contact with me questions before you sign up.

I hope to see you soon in the course!


Who this course is for:
  • Anyone interested in learning about matrices and vectors
  • Students who want supplemental instruction/practice for a linear algebra course
  • Engineers who want to refresh their knowledge of matrices and decompositions
  • Biologists who want to learn more about the math behind computational biology
  • Data scientists (linear algebra is everywhere in data science!)
  • Statisticians
  • Someone who wants to know the important math underlying machine learning
  • Someone who studied theoretical linear algebra and who wants to implement concepts in computers
  • Computational scientists (statistics, biological, engineering, neuroscience, psychology, physics, etc.)
  • Someone who wants to learn about eigendecomposition, diagonalization, and singular value decomposition!
Course content
Expand all 180 lectures 32:48:22
+ Introductions
6 lectures 46:39

Get a broad overview of linear algebra

Preview 08:03

Learn about some applications of linear algebra

Linear algebra applications
An enticing start to a linear algebra course!
Maximizing your Udemy experience

See how to use the internet to run the Python code for this course, with or without installing Jupyter on your computer.

Using MATLAB, Octave, or Python in this course
+ Vectors
24 lectures 04:16:16

zip file that contains exercises and solutions (pdf) and MATLAB and Python code.

Exercises + code

Learn two ways of interpreting vectors (this is the "algebraic-geometric dualist perspective" in linear algebra).

Algebraic and geometric interpretations of vectors

How to do basic arithmetic with vectors.

Vector addition and subtraction

Multiply a vector by a number, and learn why "scalars" are called scalars.

Vector-scalar multiplication

Arguably the most important and fundamental computation in all of linear algebra!

Vector-vector multiplication: the dot product

Learn several important properties of the vector dot product.

Dot product properties: associative, distributive, commutative

Use a for-loop to compute dot products between corresponding columns.

Code challenge: dot products with matrix columns

Learn to compute the length of a vector.

Vector length

Find the coding bug!

Vector length in MATLAB
1 question

Which of the following lines of Python code contains an error in computing the length of vector v?

Vector length in Python
1 question

How to interpret the sign of a dot product from a geometric perspective.

Preview 23:38

Determine whether two vectors in R3 are orthogonal.

Vector orthogonality
1 question

Use the dot product sign to infer geometric relationships.

Relative vector angles
1 question

Implement what you learned in code!

Code challenge: dot product sign and scalar multiplication

Is the dot product commutative? Use a computer to find out!

Code challenge: is the dot product commutative?

Learn the "sensible way" to multiply two vectors.

Vector Hadamard multiplication

Create a matrix from two vectors using the outer product.

Outer product

The special multiplication for 3-D vectors.

Vector cross product

Learn the basics of complex numbers and complex vectors.

Vectors with complex numbers

If you ever work with complex numbers in linear algebra, you need to know about the Hermitian!

Hermitian transpose (a.k.a. conjugate transpose)

"Normalize" a vector by giving it length=1.

Interpreting and creating unit vectors

Important linear algebra terminology.

Dimensions and fields in linear algebra

A subspace is an important concept in linear algebra that is fundamental for many other topics.


Two very different but easily confused topics.

Subspaces vs. subsets

Learn the algebraic and geometric interpretations of a span of a set of vectors.


Determine whether a vector is in the span of a set of vectors.

In the span?
1 question

The linear algebra declaration of linear independence! 

Linear independence

Combine independence and basis into one concept.

+ Introduction to matrices
11 lectures 01:29:16

zip file that contains exercises and solutions (pdf) and MATLAB and Python code.

Exercises + code

Learn the basic terminology of matrices.

Matrix terminology and dimensionality
Matrix sizes and dimensionality
1 question

Many matrices are given special names, here are some of them.

A zoo of matrices
Can the matrices be concatenated?
1 question

Basic arithmetic with matrices.

Matrix addition and subtraction

Multiply a matrix by a number.

Matrix-scalar multiplication

Use computers to test whether u(A+M) = uA+uM

Code challenge: is matrix-scalar multiplication a linear operation?

Flipping off a matrix or vector is actually a good thing in linear algebra.


What you learned with complex vectors applies to matrices.

Complex matrices

True or false

Addition, equality, and transpose
1 question

How to work with the diagonal elements of a matrix.

Diagonal and trace

Apply your knowledge to learn a new concept in linear algebra.

Code challenge: linearity of trace
Broadcasting matrix arithmetic
+ Matrix multiplications
21 lectures 03:40:27

zip file that contains exercises and solutions (pdf) and MATLAB and Python code.

Exercises + code

Matrix multiplication gets its own introduction.

Introduction to standard matrix multiplication

Strange but true: There are four different ways to think about matrix multiplication.

Four ways to think about matrix multiplication

Implement matrix multiplication in code.

Code challenge: matrix multiplication by layering

Diagonal matrices are convenient for many reasons, including simplicity of multiplication.

Matrix multiplication with a diagonal matrix

Learn the "LIVE EVIL" rule!

Order-of-operations on matrices

Key properties of matrix-vector multiplication.

Matrix-vector multiplication

Find the value for * that makes the equation valid.

Find the missing value!
1 question

A geometric interpretation of matrix-vector multiplication.

2D transformation matrices
Code challenge: Pure and impure rotation matrices

Also, gain new insight into the meaning of singular values!

Code challenge: Geometric transformations via matrix multiplications

Two key matrix identities lead to the zero matrix and the identity matrix.

Additive and multiplicative matrix identities

Learn how to create symmetric matrices.

Additive and multiplicative symmetric matrices

Yet another way to multiply matrices.

Hadamard (element-wise) multiplication

Determine whether two operations on matrices give identical results.

Matrix operation equality
1 question

Use code to learn an important concept in linear algebra.

Code challenge: symmetry of combined symmetric matrices

Is the product of two symmetric matrices symmetric? Find out!

Multiplication of two symmetric matrices

Use code to learn a special property of multiplication with diagonal matrices.

Code challenge: standard and Hadamard multiplication for diagonal matrices

Create a Fourier matrix and implement the Fourier transform.

Code challenge: Fourier transform via matrix multiplication!

The Frobenius dot product is used often in statistics and machine learning.

Frobenius dot product

Learn several commonly used matrix norms.

Matrix norms
Code challenge: conditions for self-adjoint

Conceptual and implementational aspects of matrix division.

What about matrix division?
+ Matrix rank
11 lectures 01:55:15

zip file that contains exercises and solutions (pdf) and MATLAB and Python code.

Exercises + code

Learn the key properies and uses of matrix rank.

Rank: concepts, terms, and applications
Maximum possible rank.
1 question

Learn the distinction between rank in a first-year course vs. rank in real-world applications.

Computing rank: theory and practice

Upper bounds of the ranks of added and multiplied matrices.

Rank of added and multiplied matrices

Test your knowledge of the rank of summed and multiplied matrices.

What's the maximum possible rank?
1 question

Create an MxN matrix with rank r.

Code challenge: reduced-rank matrix via multiplication

Does scalar multiplication change the rank of a matrix? Test your hypothesis in code!

Code challenge: scalar multiplication and rank

Rank of our favorite type of matrix: A^TA.

Rank of A^TA and AA^T

Use code to confirm your theoretical knowledge.

Code challenge: rank of multiplied and summed matrices

Transform a rank-deficient to a full-rank matrix using this one simple trick!

Making a matrix full-rank by "shifting"

Use code to test span.

Code challenge: is this vector in the span of this set?
Course tangent: self-accountability in online learning
+ Matrix spaces
9 lectures 01:17:06

zip file that contains exercises and solutions (pdf) and MATLAB and Python code.

Exercises + code

Apply a concept you've already learned (span) to a new domain.

Column space of a matrix

The column space of a matrix, visualized in MATLAB.

Column space, visualized in code

Really, it's the same as the column space, but transposed.

Row space of a matrix

Learn how to interpret and find the "null space" of a matrix.

Null space and left null space of a matrix

Learn some interesting features of matrix spaces.

Column/left-null and row/null spaces are orthogonal

See how the puzzle pieces of matrix spaces all fit together.

Dimensions of column/row/null spaces

See an example of extracting bases for the four subspaces of a matrix.

Example of the four subspaces

These equations look simple, but they are really important for applied linear algebra.

More on Ax=b and Ax=0
+ Solving systems of equations
8 lectures 01:26:14

zip file that contains exercises and solutions (pdf) and MATLAB and Python code.

Exercises + code

Understand the algebra and geometry and systems of equations.

Preview 19:39

Converting equations into matrices is the first step of advanced statistics and model-fitting.

Converting systems of equations to matrix equations

Use Gaussian elimination to solve a system of equations.

Gaussian elimination

Learn how to recognize and compute the echelon form of a matrix, and how to obtain the pivots.

Echelon form and pivots

Compute the reduced row echelon form and see how the RREF is used in solving systems of equations.

Reduced row echelon form

See the RREF form of difference kinds of matrices.

Code challenge: RREF of matrices with different sizes and ranks

How does RREF affect matrices spaces? Watch to find out!

Matrix spaces after row reduction
+ Matrix determinant
9 lectures 01:17:50

pdf file that contains exercises and solutions (pdf).


Learn the key properies and uses of matrix rank.

Determinant: concept and applications

Learn the shortcut to compute the determinant of a 2x2 matrix.

Determinant of a 2x2 matrix

See the difference between determinant in theory and determinant in computer applications.

Code challenge: determinant of small and large singular matrices

Learn the shortcut to compute the determinant of a 2x2 matrix.

Determinant of a 3x3 matrix

See what happens when you swap rows of larger matrices.

Code challenge: large matrices with row exchanges

A different perspective on the determinant will lead the way towards discovering eigenvalues!

Find matrix values for a given determinant

Discover the effects of "shifting" a matrix on its determinant.

Code challenge: determinant of shifted matrices

Illustrate a special property of the determinant, while also showing how unstable the determinant can be for larger matrices!

Code challenge: determinant of matrix product
+ Matrix inverse
13 lectures 02:11:01

zip file that contains exercises and solutions (pdf) and MATLAB and Python code.

Exercises + code

Learn the key concepts and uses of the matrix inverse.

Matrix inverse: Concept and applications

See how the inverse is computed and visually represented.

Computing the inverse in code

There is a handy short-cut for inverting a 2x2 matrix!

Inverse of a 2x2 matrix

This is the full algorithm to compute the inverse of any invertible matrix.

The MCA algorithm to compute the inverse

You know the theory, now make the magic happen in MATLAB (Or Python)!

Code challenge: Implement the MCA algorithm!!

Another way to compute the inverse is RREF, which has a more intuitive explanation compared to the MCA procedure.

Computing the inverse via row reduction

Use code to discover an interesting property of inverses of diagonal matrices.

Code challenge: inverse of a diagonal matrix

Think a rectangular matrix can't be inverted? Think again!

Preview 10:14

See how the one-sided inverse is implemented in MATLAB.

One-sided inverses in code

One inverse to rule them all!

Proof: the inverse is unique

A gentle introduction to the Moore-Penrose pseudoinverse.

Pseudo-inverse, part 1

Find out what happens when you compute the pseudoinverse of an invertible matrix.

Code challenge: pseudoinverse of invertible matrices
+ Projections and orthogonalization
13 lectures 02:40:32

zip file that contains exercises and solutions (pdf) and MATLAB and Python code.

Exercises + code

Learn how to project a point onto a line.

Projections in R^2

Extend the projection formula to any number of dimensions.

Projections in R^N

Decompose a vector into two parts -- orthogonal and parallel -- relative to another vector.

Orthogonal and parallel vector components

Translate your theoretical knowledge of vector decomposition into code!

Code challenge: decompose vector to orthogonal components

Know the key properties and definitions of an orthogonal matrix.

Orthogonal matrices

Learn the textbook procedure for orthogonalizing a matrix (and see why it's better to have computers do it for you!).

Gram-Schmidt procedure

Take the Gram-Schmidt procedure to the next level!

QR decomposition

Implement your theoretical knowledge in computers!

Code challenge: Gram-Schmidt algorithm

Take the Gram-Schmidt procedure to the next level!

Preview 01:45

Apply your theoretical knowledge in code!

Code challenge: Inverse via QR

Warning: this one's hard but rewarding!

Code challenge: Prove and demonstrate the Sherman-Morrison inverse

Strange but true! Don't believe it, prove it!

Code challenge: A^TA = R^TR