Direct Sum in LaTeX (\oplus)
- LaTeX command
\oplus- Package
- No package needed: built into LaTeX
- Mode
- Math mode only
- Copy the Unicode character
- ⊕
U+2295
Where it is used
Circled plus, for direct sums of spaces or modules and exclusive or (XOR) in Boolean algebra.
Linear algebra writes V = U \oplus W when every vector splits uniquely into parts from U and W, and module theory builds \mathbb{Z} \oplus \mathbb{Z}. In computing and cryptography a \oplus b is bitwise XOR, as in one-time pads c = m \oplus k. It is a binary operator, so it gets medium spacing. For a direct sum over an index set, use the large operator \bigoplus_{i \in I} V_i, which takes limits like \sum. Do not confuse it with \pm or a plain +; in some algebras \oplus also denotes a deformed addition.
Also listed under: Linear Algebra, Boolean Algebra, Computer Science
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Direct Sum: $\oplus$
\[ c = m \oplus k \implies m = c \oplus k \]
\end{document}Related symbols
All Advanced Operators →Frequently asked questions
- How do I write Direct Sum in LaTeX?
- Type \oplus in math mode, for example $c = m \oplus k \implies m = c \oplus k$. It works in plain LaTeX without loading any package.
- Which package do I need for \oplus?
- None. \oplus is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use \oplus in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\oplus$ in running text. If you only need the glyph in text, paste the Unicode character ⊕ instead (with XeLaTeX or LuaLaTeX and a font that has it).
Best AI LaTeX Editor, Overleaf Alternative
Octree helps researchers from 15+ universities write research papers faster using AI
- Generate beautiful TikZ diagrams using AI
- Upload image and convert it to LaTeX seamlessly
- Get instant assistance with writing and formatting research papers