We give a complete solution of the matrix equation AX + BX = 0, where A, B ∈ C m×n are two given matrices, X ∈ C n×n is an unknown matrix, and denotes the transpose or the conjugate transpose. We provide a closed formula for the dimension of the solution space of the equation in terms of the Kronecker canonical form of the matrix pencil A + λB, and we provide also an expression for the solution X in terms of this canonical form, together with two invertible matrices leading A + λB to the canonical form by strict equivalence.