Canonical: https://knowlpedia.com/algebra-modules/matrix-representation/

# Matrix representation

A matrix encoding a linear map relative to chosen bases.

The **matrix representation** of a [linear map](https://knowlpedia.com/linear-algebra/linear-map/) \(T: V \to W\) with respect to bases \(\mathcal{B} = \{v_1, \ldots, v_n\}\) of \(V\) and \(\mathcal{C} = \{w_1, \ldots, w_m\}\) of \(W\) is the \(m \times n\) [matrix](https://knowlpedia.com/linear-algebra/matrix/) \([T]_{\mathcal{B}}^{\mathcal{C}}\) whose columns are the coordinate vectors of \(T(v_j)\) in the basis \(\mathcal{C}\).

That is, if \(T(v_j) = \sum_{i=1}^m a_{ij} w_i\), then the \((i,j)\) entry of the matrix is \(a_{ij}\).

Writing \(F\) for the field of scalars, the matrix is defined so that the square below commutes, where the vertical maps take coordinate vectors in the bases \(\mathcal B\) and \(\mathcal C\):

```tikz-cd
V \arrow[r, "T"] \arrow[d, "{[\,\cdot\,]_{\mathcal B}}"', "\cong"] & W \arrow[d, "{[\,\cdot\,]_{\mathcal C}}", "\cong"'] \\
F^n \arrow[r, "{[T]_{\mathcal B}^{\mathcal C}}"'] & F^m
```

## Properties

- **Composition**: \([ST]_{\mathcal{B}}^{\mathcal{D}} = [S]_{\mathcal{C}}^{\mathcal{D}} [T]_{\mathcal{B}}^{\mathcal{C}}\).
- **Change of basis**: If \(P\) and \(Q\) satisfy \([v]_{\mathcal B}=P[v]_{\mathcal B'}\) and \([w]_{\mathcal C}=Q[w]_{\mathcal C'}\), then \([T]_{\mathcal{B}'}^{\mathcal{C}'} = Q^{-1} [T]_{\mathcal{B}}^{\mathcal{C}} P\).
- **Similarity**: Two matrices represent the same operator (different bases) iff they are similar.

## Standard representation

For \(T: \mathbb{R}^n \to \mathbb{R}^m\), the standard matrix is \([T(e_1) \mid \cdots \mid T(e_n)]\).

## Invariants

The [rank](https://knowlpedia.com/linear-algebra/rank/) is independent of both basis choices. For an endomorphism \(T:V\to V\), the [determinant](https://knowlpedia.com/linear-algebra/determinant/) and [eigenvalues](https://knowlpedia.com/linear-algebra/eigenvalue/) are also independent of the basis used for both domain and codomain.
