What do you mean by the subspace spanned by the matrices? What do you mean by the subspace spanned by the matrices $\{1,A,A^2,\dots,A^n\}$ where A is and $n\times n$ real or complex matrix.

This answer just adds a small point which seems not to have been mentioned yet.  As already stated, the subspace spanned by the matrices is the set of all linear combinations of the matrices.
By the Cauchy-Hamilton Theorem, the $n\times n$ matrix $A$ satisfies its own characteristic polynomial, which has degree $n$.  That is,
$$\lambda_0I+\lambda_1A+\cdots+\lambda_nA^n={\bf0}\ .$$
Therefore the $n+1$ matrices you have given must be linearly dependent, and the dimension of the subspace is $n$ or less.
The exact dimension will be the degree of the minimal polynomial of $A$, as mentioned elsewhere.
