Direct sum modules

77 Views Asked by At

I am learning about direct sum of modules. It says that the direct sum of a finite number of modules is equal to the cartesian product of the modules $$A \oplus B = A × B = \{(a, b) :\, a ∈ A \textrm{ and } b ∈ B\}.$$ But I also read: $$A \oplus B = A + B = \{a + b :\, a ∈ A \textrm{ and } b ∈ B\} \textrm{ if } A ∩ B = \{0\}.$$ So which is it?