CommutatorOfAlgebra

Let $K$ be a field , $A$ an $K$-algebra, and let $V$ and $W$ be subspaces of $A$. CommutatorOfAlgebra(K, V, W) returns the subspace $[V, W]=\langle vw-wv \mid v\in V,\ w \in W\rangle_K$. CommutatorOfAlgebra(K, V) returns $[V,V]$.