I don't know if there is a general rule for simplifying the original expression: ([A]x-y)^{T}* ([A]x -y)

However, if it is supposed to be capable of being rearranged into the form for Quadratic Programming, the [Q] matrix is symmetric. Not sure if that helps to work backward.

Do you know ahead of time if the [A] matrix has any special properties?