Multiplication in Direct Sum of Algebras Say I have a (non-unital) algebra $A$ which decomposes as a direct sum $A = V \oplus W$, where $V$ and $W$ are subalgebras. In an algebra, the multiplication is distributive over addition. Therefore, for two elements $v \in V$ and $w \in W$, we have that 
$$ (v+ w)(v+w) = v^2 + vw + wv + w^2. $$
On the other hand, since $A = V \oplus W$, we have that the multiplication is component-wise,
$$(v+w)(v+w) = v^2 + w^2.$$
Is there a way to see these two are compatible? I.e. that, in this setup, $vw + wv = 0$?
EDIT: Ok, so here's another way to look at my problem. Suppose $A$ is an algebra, so in particular it's a vector space. Let $V$ and $W$ be subspaces such that $A = V \oplus W$ where $\oplus$ is a vector space direct sum. The question is then, if $V$ and $W$ are also subalgebras of $A$, does this then extend to a direct sum of algebras?
 A: Let's clear up some things from the comments. For categorical reasons, writing a direct product of rings $R\times S$ as a direct sum $R\oplus S$ might be misleading since $R\times S$ is not a coproduct, although in the case of algebras they are in particular vector spaces which we like writing $\oplus$ for, so in the context of algebras we might use $\oplus$ too. However we even use $\oplus$ for vector space decompositions of algebras (in order to signify grading), such as $\mathbb{C}[x]=\mathbb{C}\oplus\mathbb{C}x\oplus\mathbb{C}x^2\oplus\cdots$. In this answer I will decide to use $\times$ for direct products of rings in order to distinguish it from internal vector space direct sum. Also, let's distinguish internal from external perhaps.
If $R$ and $S$ are any two rings, the external direct product $R\times S$ is the the set of all ordered pairs $(r,s)$ with $r\in R$ and $s\in S$ with "componentwise" multiplication $(r_1,s_1)(r_2,s_2)=(r_1r_2,s_1s_2)$. If we're talking about unital rings $R$ and $S$, then $(1_R,1_S)$ is the unique identity for $R\times S$, and the elements $e_R=(1_R,0_S)$ and $e_S=(0_R,1_S)$ are not identity elements.
Instead they are idempotents (i.e. $e^2=e$), they are central (so $ex=xe$ for all $x\in R\times S$) and they are orthogonal (since $e_Re_S=0_{R\times S}$). I'll leave you to verify my parenthetical statements as an exercise.
There are (non-unital) ring embeddings $R\to R\times S$ and $S\to R\times S$, in which (by abuse of notation) we may write $r$ when we mean $(r,0_S)$ or write $s$ when we mean $(0_R,s)$. In this case, the product $rs$ is short for $(r,0_S)(0_R,s)=(r\cdot0_R,0_S\cdot s)=(0_R,0_S)=0_{R\times S}$. In particular, elements of $R$ and $S$ are identified with zero divisors in $R\times S$. With this abuse of notation, multiplication-by-$e_R$ is just the projection map $R\times S\to R$, and multiplication-by-$e_S$ is the projection map $R\times S\to S$.
Now let's switch gears. Suppose $A$ is any rings, and $R$ and $S$ are subrings for which every $a\in A$ may be uniquely written as $a=r+s$ for some $r\in R$, $s\in S$. If in addition we have $rs=0$ for all $r\in R$ and $s\in S$, then we write $A=R\times S$ and we call $A$ an internal direct product of $R$ and $S$. Note that the external direct product $R\times S$ is an internal direct product of $R\times\{0_S\}$ and $\{0_R\}\times S$ under these definitions.
They're both ways of talking about the same thing, the difference is we use the term "internal" when we're viewing $R$ and $S$ as subrings of an already-existing algebra $A$, and we use the term "external" when we're creating a new algebra out of already-existing rings $R$ and $S$.
If $A$ is unital and $A=R\times S$ is an internal direct product, then $1_A=e_R+e_S$ for some unique elements $e_R\in R$ and $e_S\in S$. As an exercise, check that $e_R$ and $e_S$ are orthogonal, central idempotents. Next, check that $R:=e_RA$ and $S:=e_SA$ are ideals, and in particular they are subrings, and that $A=R\times S$ is an internal direct product. Third, verify that if $e\in R$ is a central idempotent, then $e$ and $1-e$ are orthogonal central idempotents. Finally, prove that if $1_A\in A$ is a primitive idempotent then $A$ is not the internal direct product $A=R\times S$ of any two subrings $R\times S$. (Here let's not assume subrings share the same identity element.)
In conclusion, for unital rings, direct factors correspond to central, orthogonal idempotents. Sorry for the entire chapter, but I thought you might like this theory.
Anyway, if $A$ is an algebra, then it is possible for $A$ to be the internal vector space direct sum $V\oplus W$ of subalgebras $V$ and $W$ without being an internal direct product $V\times W$ of subrings $V$ and $W$. For instance, if we don't care about having identity elements, $A=\mathbb{R}\times\mathbb{R}[\varepsilon]/(\varepsilon^2)$ is a vector space direct sum of subalgebras $V=\mathbb{R}\times\mathbb{R}$ and $W=\{0\}\times\mathbb{R}\varepsilon$ but it is not a direct product of them as subrings, since $(0,1)$ is not orthogonal to $(0,\varepsilon)$. However it is a direct product of subrings $Y=\mathbb{R}$ (the first component) and $X=\mathbb{R}[\varepsilon]/(\varepsilon^2)$. Notice that $\dim V=\dim X=2$ and $\dim W=\dim Y=1$ but $X\not\cong V$ as algebras.
A: If $V$ and $W$ are subalgebras and $A=V\oplus W$ as a vector space, it is not necessarily true that $A=V\oplus W$ as an algebra.  For instance, consider a commutative algebra $A$ with basis $\{x,y,z\}$ with $xy=y^2=z$ and $x^2=xz=yz=z^2=0$.  Take $V$ to be the span of $\{x\}$ and $W$ to be the span of $\{y,z\}$.  Then $V$ and $W$ are subalgebras and $A=V\oplus W$ as a vector space.  But for $v=x$ and $w=y$, $vw+wv=2z\neq 0$ (assuming our field does not have characteristic $2$).
