# Linear algebra - matrices and polynomials

## Homework Statement

Prove for each square matrix B there is a real polynomial p(x) (not the zero polynomial) so p(B)=0

## Homework Equations

Rank-nullity? dimv = r(T) + n(T)

## The Attempt at a Solution

I've found the dimension for nxn square matrices (n²) and a basis (1 in one place and zero in the rest for each place in the matrix) but I don't really know where to go from here. Any ideas would be great :) thanks.

Consider,
$$1,B,B^2,B^3,...,B^{n^2}$$
is this set linearly dependent? (can n^2+1 many vectors be linearly independent in a n^2 dimensional vector space?) If they are linearly dependent you can find coefficients a0,a1,a2,...,a(n^2) such that,
$$\sum_{i=0}^{n^2} a_i B^i = 0$$
so consider,
$$p(x) = \sum_{i=0}^{n^2} a_i x^i$$

Thank you, that helped a lot.