Problem statement and knowns/unknowns

This worksheet combines common matrix and vector tasks into one repeatable flow. Use it as a baseline for quick numerical checks before deeper modeling.

  • Compute determinant, inverse, direct solve result, and eigenvalues for a square matrix.
  • Run vector dot and cross product comparisons.
  • Build and solve normal equations for a least-squares fit.

Recommended workflow

Replace `A` and `b` first and validate `detA` to check conditioning risks. Then move to the vector and fitting rows to test sensitivity and trend lines.

Assumptions, validity limits, and unit discipline

  • `x=Ainv*b` assumes `A` is invertible. If `detA` is near zero, results can be numerically unstable.
  • The least-squares rows solve a linear model (`fit=beta0+beta1*t`) for four data points. Adjust `n` and sum rows when dataset size changes.
  • If matrix entries represent physical quantities, keep a consistent unit system across all rows so coefficients remain interpretable.

Derivation and governing equations

x = A^-1 b
A^T A beta = A^T y
fit(t) = beta0 + beta1*t

FAQ

How do I interpret near-zero determinant?

A near-zero determinant indicates an ill-conditioned or singular system where solve outputs may be unstable.

Can this handle symbolic matrices?

Yes. Symbolic expressions are supported, then you can substitute numeric values later in the same sheet.

Worked example (interpreted)

Step 1: For the baseline matrix, detA=43 and the solution is x=[1.9302, 2.0233, 1.3721].

Step 2: Residual rows give r=A*x-b and residual_energy=0, confirming a consistent solve.

Step 3: Regression rows yield beta0=0.9 and beta1=0.9.

Interpretation: baseline case is well-behaved; compare against the near-singular variant before trusting sensitivity-heavy conclusions.

When this model is invalid

ConditionWhy invalidUse instead
detA near zeroInverse-based solve becomes ill-conditioned.Pivoted decomposition (QR/SVD) and condition-number checks.
Underdetermined/overdetermined systemsA^-1 b is not defined for non-square or rank-deficient systems.Least-squares or minimum-norm formulations.
Large scaling mismatchNumerical error dominates symbolic-looking outputs.Scale variables and monitor residual-energy rows.

How to validate your worksheet

  • residual_energy should remain close to zero.
  • Compare detA vs detA_variant to see conditioning sensitivity.
  • invalidity_proxy rising sharply flags near-singular behavior risk.

Domain-specific variants in this template

The near-singular branch (A_variant) intentionally stresses inversion stability so teams can see how tiny coefficient changes affect output credibility.

Practice problems (with answer outlines)

Practice 1

Perturb one matrix entry and inspect how x and residual respond.

Outline: Compare baseline and perturbed solves to identify conditioning sensitivity.

Practice 2

Update regression data and recompute normal-equation coefficients.

Outline: Rebuild normal_lhs, normal_rhs, and infer parameter trend changes.

References and standards

  • Gilbert Strang, Introduction to Linear Algebra (core concepts). Course/reference page.
  • Golub & Van Loan, Matrix Computations (numerical methods). Book page.
  • NIST Dataplot/linear regression references (practical validation workflows). NIST handbook.