Matrix-Vector Equations - Some Theory

Linear Algebra for Data Science in R

Eric Eager

Data Scientist at Pro Football Focus

A Matrix-Vector Equation Without a Solution

  • Inconsistent
Linear Algebra for Data Science in R

A Matrix-Vector Equation with Infinitely-Many Solutions

  • Consistent (but infinitely-many solutions)
Linear Algebra for Data Science in R

A Matrix-Vector Equation with a Unique Solution

  • Consistent (unique solution)
Linear Algebra for Data Science in R

Properties of Solutions to Matrix-Vector Equations - Exactly One Solution

Linear Algebra for Data Science in R

Properties of Solutions to Matrix-Vector Equations - No Solutions

Linear Algebra for Data Science in R

Properties of Solutions to Matrix-Vector Equations - Infinitely-Many Solutions

Linear Algebra for Data Science in R

Properties to Ensure A Unique Solution to $A\vec{x} = \vec{b}$

If $A$ is an $n$ by $n$ square matrix, then the following conditions are equivalent and imply a unique solution to $$A\vec{x} = \vec{b}:$$

  • The matrix $A$ has an inverse (is invertible)
  • The determinant of $A$ is nonzero
  • The rows and columns of $A$ form a basis for the set of all vectors with $n$ elements
Linear Algebra for Data Science in R

Properties to Ensure A Unique Solution to $A\vec{x} = \vec{b}$

print(A)
  • Computing the Inverse of $A$ (if it Exists)

    solve(A)
    
  • Computing the Determinant of $A$

    det(A)
    
     [,1] [,2]
[1,]    1   -2
[2,]    0    4
     [,1] [,2]
[1,]    1 0.50
[2,]    0 0.25
4
Linear Algebra for Data Science in R

Let's practice!

Linear Algebra for Data Science in R

Preparing Video For Download...