OutputForm[expr]
prints as a two-dimensional representation of expr using only keyboard characters.
OutputForm
OutputForm[expr]
prints as a two-dimensional representation of expr using only keyboard characters.
Details
- OutputForm is an approximation to StandardForm which uses only ordinary keyboard characters.
- The OutputForm of many kinds of expressions is quite different from their internal representation.
- When an input evaluates to OutputForm[expr], OutputForm does not appear in the output. »
- OutputForm cannot be used directly for input to the Wolfram Language.
- When possible, OutputForm uses approximations to special characters. Thus ≥ is given as >= and é as e'. »
Examples
open all close allBasic Examples (2)
OutputForm of a typeset expression:
OutputForm[(x/Sqrt[5]) + y^2 + 1 / z]OutputForm of a graphic:
[image]//OutputFormScope (8)
Basic Objects (2)
Integer, Rational, Real, and Complex numbers:
Map[OutputForm, {123, 1 / 23, 1.23, 1 + 23I}]Arbitrary-precision Real and Complex numbers:
OutputForm /@ N[{10 / 3, 10 / 3I}, 20]OutputForm /@ {I, π, E}Characters and strings of characters:
OutputForm /@ {"a", "α", "⊕"}Control characters for strings:
OutputForm["A first line
A second line"]Special Input Forms (4)
Different Power expressions:
OutputForm /@ {a ^ x, a^x, a^(1/(3)), Exp[x], 1 / x, (1/x)}OutputForm /@ {y'[x], ∫y[x]ⅆx, Subsuperscript[∑, k = 1, n]y[k], Subsuperscript[∏, k = 1, n]y[k], x∈Reals, x∧y∨z}OutputForm[{1, 2, 3}]OutputForm /@ {(| | | |
| - | - | - |
| a | b | c |
| d | e | f |), {{a, b, c}, {d, e, f}}}Inputs with subscripts, superscripts, etc.:
OutputForm /@ {Subscript[x, a], x^a, Overscript[x, a], Underscript[x, a]}Special Output Forms (2)
Some objects use a special output representation:
ser = Series[Sin[x], {x, 0, 3}]Compare the OutputForm with the underlying FullForm of the expression:
OutputForm[ser]FullForm[ser]Some objects use an elided output representation:
sp = SparseArray[{{1, 2} -> 1}, {5, 5}]OutputForm[sp]The elided information is visible in the FullForm:
FullForm[sp]Properties & Relations (5)
When an input evaluates to OutputForm[expr], OutputForm does not appear in the output:
OutputForm[x ^ 2]Out is assigned the value x2, not OutputForm[x^2]:
%Special characters format as keyboard characters:
a ≥ bOutputForm[%]OutputForm formats in two dimensions:
OutputForm[Exp[I x / n]]StandardForm and TraditionalForm are two-dimensional with additional formatting:
StandardForm[Exp[I x / n]]TraditionalForm[Exp[I x / n]]InputForm and FullForm provide one-dimensional formatting:
InputForm[Exp[I x / n]]FullForm[Exp[I x / n]]Use ToString to generate a string in OutputForm:
ToString[1 / a + x ^ 2, OutputForm]Head[%]Add formatting via Format:
bin[x, y]//OutputFormFormat[bin[x_, y_], OutputForm] := MatrixForm[{{x}, {y}}]bin[x, y]//OutputFormPossible Issues (1)
Even when an output omits OutputForm from the top level, it is not stripped from subexpressions:
e = OutputForm[x ^ 2]The output does not have OutputForm in it:
%However, the variable e does have OutputForm in it, which may affect subsequent evaluations:
FullForm[e]The product is not evaluated due to the intervening OutputForm:
x * eAssign variables first and then apply OutputForm to the result to maintain computability:
(f = x ^ 2)//OutputFormx * fTech Notes
Related Guides
Related Workflows
- Deploy and Use a Cloud-Based API on the Command Line
History
Introduced in 1988 (1.0) | Updated in 1996 (3.0)
Text
Wolfram Research (1988), OutputForm, Wolfram Language function, https://reference.wolfram.com/language/ref/OutputForm.html (updated 1996).
CMS
Wolfram Language. 1988. "OutputForm." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 1996. https://reference.wolfram.com/language/ref/OutputForm.html.
APA
Wolfram Language. (1988). OutputForm. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/OutputForm.html
BibTeX
@misc{reference.wolfram_2026_outputform, author="Wolfram Research", title="{OutputForm}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/OutputForm.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_outputform, organization={Wolfram Research}, title={OutputForm}, year={1996}, url={https://reference.wolfram.com/language/ref/OutputForm.html}, note=[Accessed: 13-June-2026]}