# How can I write upside down real numbers symbol ($\mathbb{R}$)?

How can I write $\mathbb{R}$ upside down? And, in general, \mathbb letters...

1. \umathbb{R} for u​pside down
2. \rmathbb{R} for r​eflected
3. \fmathbb{R} for f​lipped
\documentclass{article}

\usepackage{amsfonts}
\usepackage{graphicx}

\makeatletter
\newcommand{\umathbb}[1]{{\mathpalette\dude@umathbb{#1}}}
\newcommand{\dude@umathbb}[2]{%
\raisebox{\depth}{\rotatebox{180}{$\m@th#1\mathbb{#2}$}}%
}
\newcommand{\rmathbb}[1]{{\mathpalette\dude@rmathbb{#1}}}
\newcommand{\dude@rmathbb}[2]{%
\scalebox{-1}[1]{$\m@th#1\mathbb{#2}$}%
}
\newcommand{\fmathbb}[1]{{\mathpalette\dude@fmathbb{#1}}}
\newcommand{\dude@fmathbb}[2]{%
\raisebox{\depth}{\scalebox{1}[-1]{$\m@th#1\mathbb{#2}$}}%
}
\makeatother

\begin{document}

$A\umathbb{R}B$ $A\rmathbb{R}B$ $A\fmathbb{R}B$

$X_{\umathbb{R}}$ $X_{\rmathbb{R}}$ $X_{\fmathbb{R}}$

\end{document}


• Odd. I would usually consider "upside down" to mean "reflected about a horizontal axis," but it appears that by this definition, it means "rotated by 180 degrees." – jpmc26 Oct 30 '18 at 22:54
• @jpmc26 There were two possible interpretations of the OP's request, so I provided both. – egreg Oct 30 '18 at 23:01
• @jpmc26, personally I consider it a 180 rotation such that it can be read upside down (at least the individual glyphs can be), but I can see your point of view also :) – Lamar Latrell Oct 30 '18 at 23:11

To rotate upside down:

\documentclass{article}

\usepackage{amsfonts}
\usepackage{graphicx}

\begin{document}

X\rotatebox[origin=c]{180}{$\mathbb{R}$}X

\end{document}


Supports smaller math styles.

\documentclass{article}
\usepackage{amsfonts,scalerel,graphicx}
\newcommand\umathbb[1]{%
\ThisStyle{\rotatebox[origin=c]{180}{$\SavedStyle\mathbb{#1}$}}}
\newcommand\rmathbb[1]{%
\ThisStyle{\scalebox{-1}[1]{$\SavedStyle\mathbb{#1}$}}}
\newcommand\fmathbb[1]{%
\ThisStyle{\scalebox{-1}[1]{\rotatebox[origin=c]{180}{$\SavedStyle\mathbb{#1}$}}}}
\begin{document}
$A\mathbb{R}B\quad A\umathbb{R}B\quad A\rmathbb{R}B\quad A\fmathbb{R}B$
$X_{\mathbb{R}} X_{\umathbb{R}} X_{\rmathbb{R}} X_{\fmathbb{R}}$
$\mathbb{R}_{\mathbb{R}_{\mathbb{R}}}\quad \umathbb{R}_{\umathbb{R}_{\umathbb{R}}}\quad \rmathbb{R}_{\rmathbb{R}_{\rmathbb{R}}}\quad \fmathbb{R}_{\fmathbb{R}_{\fmathbb{R}}}$
\end{document}