The expression from above can be simplified by replacing the single vector from the input and dual state with its full Vector and R,D and Q by its blockdiagonal matrix.