Linear Solve, Part 1

Note: This article assumes you know about matrix and vector math. If not, you might want to peruse an introduction to the subject [note self: write one].

A set of linear equations in 2 unknowns \(x_1, x_2\)

\begin{align}
b_1& =a_{11} x_1 + a_{12} x_2 \\
b_2& =a_{21} x_1 + a_{22} x_2 \\
b_3& =a_{31} x_1 + a_{32} x_2
\end{align}
can be written as
\begin{align}
Ax=b
\end{align}
where
\begin{equation}
A =\begin{bmatrix}
a_{11}& a_{12}\\
a_{21}& a_{22}\\
a_{31}& a_{32}\\
\end{bmatrix}
\end{equation}
\begin{equation}
x =\begin{bmatrix}
x_1\\
x_2
\end{bmatrix}
\end{equation}

\begin{equation}
b =\begin{bmatrix}
b_1\\
b_2\\
b_3
\end{bmatrix}
\end{equation}

In general, let a be an \(m \mathrm{x} n \) matrix (that means m rows and n columns). Then we are given the A and b and are asked what values of x “work” here. There are a number of things that x could mean, and various configurations, depending on the sizes of the b’s and x’s

  • There might be no solution, i.e. no value of x makes Ax=b. We might want to know what value of x makes this as close as possible. This is the famous least squares problem, or linear regression.
  • There might be many solutions; we would be interested in characterizing those solutions
  • There might be exactly one solution, we would be interested in finding it.

Note: In MATLAB or octave, this would be called solving for x using the command: x=A\b

The linear equation \(Ax=b\) has been called the “most important equation in the world” 1. This book is an excellent reference for learning linear algebra – no need for another book. The free online course, MIT Introduction to Linear Algebra, taught by Gilbert Strang, uses this book.

Want to use linear equations for approximations? See Using Linear Equation for Approximations.

 

Notes:

  1. Strang, Gilbert. Introduction to Linear Algebra, Fifth Ed. Wellesley: Wellesley-Cambridge Press., 2016.

Leave a Reply

Your email address will not be published.