Let's say $\mathbf{w}$ is a column vector, and $A$ is a matrix such that, $\mathbf{w}^TAA^T$ is computable. Let $\lambda$ be a scalar. Does the following hold?
$$
\mathbf{w}^TAA^T + \mathbf{w}\lambda = \mathbf{w}^TAA^T + \mathbf{w}^T\lambda
$$
As you can see, in the left-hand-side of the equation, the second term should result in a column vector, and on the right-hand-side of the equation, the second term has been transposed.
Is that allowed?