In [8]:
from sympy import Symbol, Matrix
from sympy.interactive import printing
printing.init_printing()

dt = Symbol('\Delta t')

Q = Matrix([[.5*dt**2], [.5*dt**2], [dt], [dt]])
Q*Q.T


Q = Matrix([[.5*dt**2], [dt]])
Q*Q.T
Out[8]:
$$\left[\begin{matrix}0.25 \Delta t^{4} & 0.5 \Delta t^{3}\\0.5 \Delta t^{3} & \Delta t^{2}\end{matrix}\right]$$