This is my code:
syms a1 b1 a2 b2 c d
ket_psi1 = [a1;b1];
ket_psi2 = [a2;b2];
ket_phi = [c;d];
lefthandside=kron((ket_psi1+ket_psi2),ket_phi)
righthandside=kron(ket_psi1,ket_phi)+kron(ket_psi2,ket_phi)
lefthandside-righthandside
This results in c*(a1 + a2) - a2*c - a1*c.
Description for syms is given as "syms var1 ... varN creates symbolic scalar variables var1 ... varN of type sym". So, if the symbols represent scalars, then why isn't MATLAB showing 0 instead of the given result above?