Lab 2 Interactive: Matrix Algebra

Explore matrix products, noncommutativity, inverses, rank, transposes, and LU factorization. The goal is to connect algebraic rules with geometry and computation.

1. Choose two matrices

Use $2\times2$ matrices so that products, inverses, rank, and geometry can be seen at the same time.

Matrix A

Matrix B

Computation

2. Matrix as a geometric machine

The plot shows how the selected matrix transforms the unit square and the standard basis vectors. Blue: original. Orange: transformed.

3. Matrix products and noncommutativity

Matrix multiplication represents composition of transformations. Usually $AB\neq BA$, because doing transformation $B$ first and then $A$ is not the same as doing $A$ first and then $B$.

4. Rank, determinant, and inverse

For a $2\times2$ matrix $A=\begin{bmatrix}a&b\\c&d\end{bmatrix}$, $A$ is invertible exactly when $ad-bc\neq0$.

5. Transpose and Gram matrix

The Gram matrix $A^T A$ records dot products among the columns of $A$. It is always symmetric.

6. LU factorization practice

Enter a $3\times3$ matrix. The tool performs LU factorization without pivoting when possible. This illustrates how elimination is recorded as $A=LU$.

7. Student practice tasks

Task A. Find matrices $A$ and $B$ such that $AB\neq BA$. Record $AB$, $BA$, and explain why the order matters geometrically.
Task B. Create an invertible matrix $A$. Record $\det(A)$, $\operatorname{rank}(A)$, and $A^{-1}$. Verify $AA^{-1}=I$.
Task C. Create a singular matrix $A$. Explain what information is lost geometrically. What happens to the unit square?
Task D. Compute $A^TA$. Explain why it is symmetric and what geometric information it contains.
Task E. Use the LU tool on the Chapter 2 example. Record $L$ and $U$, and verify $A=LU$.

8. Short-answer workspace