SimuveliqLearnEspañolOpen the simulators
Learn › Math

Matrices and linear algebra

A matrix is a table of numbers that represents a system of equations or a linear transformation (rotating, stretching, projecting). This topic explains matrix operations, the determinant, the inverse, the rank and row reduction, and eigenvalues and eigenvectors, which is how linear algebra is used in structures, circuits, vibrations and control.

Operations

Matrices of the same size are added element by element. The product exists if has as many columns as has rows; element is row of times column of :

1234·0110=2143ABABrow 1 of A times column 2 of B:c₁₂ = 1·1 + 2·0 = 1
One element of the product: row times column.

The product is not commutative: in general . The identity (ones on the diagonal) satisfies , and the transpose swaps rows and columns, with .

Determinant and inverse

The determinant of a square matrix is a number that says how much the transformation scales areas (or volumes); if it is 0, it squashes space into a lower dimension and the matrix has no inverse. For , ; in general it is expanded by cofactors of a row or column, or the matrix is reduced to echelon form and the pivots are multiplied.

For larger sizes the inverse is found by writing and row-reducing to . With it, the system has the unique solution .

For a square matrix, these are equivalent:
has an inverse
the columns are linearly independent
has a unique solution for every
0 is not an eigenvalue of

Rank and row reduction

The reduced row echelon form is reached with row operations (the same as for systems): each nonzero row starts with a 1 (pivot) that is the only nonzero entry of its column. The rank is the number of pivots: how many rows (or columns) are truly independent. Columns without a pivot correspond to free variables.

Eigenvalues and eigenvectors

An eigenvector is a direction the matrix does not turn, it only stretches it by a factor (its eigenvalue): . The eigenvalues are the roots of the characteristic polynomial:

v₁Av₁ = 5v₁v₂Av₂ = 2v₂uAuA = [4 1; 2 3]eigenvectors are onlystretched (λ = 5 and λ = 2);another vector, u, also turns
Action of : the eigenvectors keep their direction.

For each , the eigenvectors are the nonzero solutions of . If there are independent eigenvectors, is diagonalizable: , with the vectors in the columns of and the values on the diagonal of . This is how powers are computed (), systems of ODEs are decoupled and vibration modes are found.

The calculator works with exact fractions and checks every result (, ). The cells also accept letters: with a parameter it computes the determinant and says for which values the matrix is not invertible, or discusses the rank.

Common mistakes

  • Multiplying element by element instead of row times column, or assuming .
  • Forgetting the sign of the cofactors.
  • Writing : the order reverses, .
  • Giving the zero vector as an eigenvector, or believing every matrix is diagonalizable.

Worked examples

Example 1Matrix product

Compute with and .

Solution

  1. , , , .
  2. Multiplying by on the right swaps the columns of . In contrast swaps the rows: .

Solve it in Simuveliq

  1. In Math → Symbolic calculator, tab Matrices, Operation = «A · B · …»: type A and B in the cells and press Compute. The Answer is .

Example 23 × 3 determinant

Compute .

Solution

  1. By cofactors of the first row: .
  2. . Since it is not 0, the matrix is invertible.

Solve it in Simuveliq

  1. In Math → Symbolic calculator, tab Matrices, Operation = «Determinant»: type the matrix in the cells and press Compute. The Answer is .

Example 32 × 2 inverse

Find the inverse of .

Solution

  1. .
  2. . Check: ✓.

Solve it in Simuveliq

  1. In Math → Symbolic calculator, tab Matrices, Operation = «Inverse»: type the matrix in the cells and press Compute. The Answer is with those values; the steps do it by Gauss-Jordan on .

Example 4Rank

Find the rank of .

Solution

  1. leaves row 2 as zeros: it is twice the first.
  2. gives , nonzero. Two pivots remain: rank 2, and therefore .

Solve it in Simuveliq

  1. In Math → Symbolic calculator, tab Matrices, Operation = «Rank»: type the matrix in the cells and press Compute. The Answer is .

Example 5Eigenvalues and eigenvectors

Find the eigenvalues and eigenvectors of .

Solution

  1. .
  2. : → → .
  3. : → → . Check: ✓.
with ; with .

Solve it in Simuveliq

  1. In Math → Symbolic calculator, tab Matrices, Operation = «Eigenvalues and eigenvectors»: type the matrix in the cells and press Compute. The Answer is .
  2. The steps factor the characteristic polynomial and give the algebraic and geometric multiplicities of each value.

Example 6A matrix that cannot be diagonalized

Is diagonalizable?

Solution

  1. : a single eigenvalue, , double (algebraic multiplicity 2).
  2. → : only the direction (geometric multiplicity 1).
  3. 2 independent eigenvectors are needed and there is only 1: it is not diagonalizable (it is a shear).
It is not diagonalizable.

Solve it in Simuveliq

  1. In Math → Symbolic calculator, tab Matrices, Operation = «Diagonalize (A = PDP⁻¹)»: type the matrix in the cells and press Compute. The Answer is «Not diagonalizable (not enough eigenvectors)».

Example 7Determinant with a parameter

For which values of is invertible?

Solution

  1. .
  2. , which vanishes at and .
: invertible if and .

Solve it in Simuveliq

  1. In Math → Symbolic calculator, tab Matrices, Operation = «Determinant»: type the matrix, with k on the diagonal in the cells and press Compute. The Answer is (invertible if ).

Related topics