Helpful functions for using the properties of the Kronecker product, also has a memory efficient dot product.