# Computational Mechanics 4 - Linear Algebra

Welcome to Computational Mechanics Module #4! In this module we will explore applied linear algebra for engineering problems and revisit the topic of linear regression with a new toolbox of linear algebra. Our main goal, is to transform large systems of equations into manageable engineering solutions.

- How to solve a linear algebra problem with
`np.linalg.solve`

- Creating a linear system of equations
- Identify constants in a linear system $\mathbf{A}$ and $\mathbf{b}$
- Identify unknown variables in a linear system $\mathbf{x}$
- Identify a
**singular**or**ill-conditioned**matrix - Calculate the
**condition**of a matrix - Estimate the error in the solution based upon the condition of a matrix

- Graph 2D and 3D linear algebra problems to identify a solution (intersections
- of lines and planes)
- How to solve a linear algebra problem using
**Gaussian elimination**(`GaussNaive`

) - Store a matrix with an efficient structure
**LU decomposition**where $\mathbf{A=LU}$ - Solve for $\mathbf{x}$ using forward and backward substitution (
`solveLU`

) - Create the
**LU Decomposition**using the Naive Gaussian elimination process (`LUNaive`

) - Why partial
**pivoting**is necessary in solving linear algebra problems - How to use the existing
`scipy.linalg.lu`

to create the**PLU decomposition** - How to use the
**PLU**efficient structure to solve our linear algebra problem (`solveLU`

)

- How to use the
*general least squares regression*method for almost any function - How to calculate the coefficient of determination and correlation coefficient for a general least squares regression, $r^2~ and~ r$
- How to plot and read a
**training-testing**plot - How to divide data into
**training**and**testing**data for analysis - Why we need to avoid
**overfitting** - How to construct general least squares regression using the dependent and independent data to form $\mathbf{y}=\mathbf{Za}$.
- How to construct a piecewise linear regression