  Let $R$ be an associative ring with identity $1$. We describe all matrices in
$T_n(R)$ the ring of $n\times n$ upper triangular matrices over $R$ ($n\in
\mathbb{N}$), and $T_{\infty}(R)$ the ring of infinite upper triangular
matrices over $R$, satisfying the quadratic polynomial equation $x^2-rx+s=0$.
For such propose we assume that the above polynomial have two different roots
in $R$. Moreover, in the case that $R$ in finite, we compute the number of all
matrices to solves the matrix equation $A^2-rA+sI=0,$ where $I$ is the identity
matrix.
