Styled Math Descriptions & KaTeX Examples

MathematicsMath RenderingKaTeXLaTeXTypographyStyled EquationsInline MathDisplay MathMathematical NotationAdvanced Math Formatting

Math rendering Template

Below are examples of inline math descriptions, each styled with different fonts. The font sizes have been increased for testing purposes. Adjust these values until you find the ideal appearance for your blog.

Inline Math (Handwritten Style)

A classic inline equation: Euler’s identity is given by eiπ+1=0e^{i\pi} + 1 = 0. Inline fractions like ab\frac{a}{b} and exponentials such as a2+b2=c2a^2 + b^2 = c^2 showcase a warm, handwritten aesthetic.

Inline Math (Monospace Style)

For a technical feel, Euler’s identity is shown as eiπ+1=0e^{i\pi} + 1 = 0, accompanied by inline fractions like ab\frac{a}{b} and exponentials such as a2+b2=c2a^2 + b^2 = c^2 in a clear monospace font.

Inline Math (Serif Style)

Euler’s identity, expressed as eiπ+1=0e^{i\pi} + 1 = 0, appears elegantly in a serif font. Inline fractions like ab\frac{a}{b} and expressions such as a2+b2=c2a^2 + b^2 = c^2 offer a refined, traditional look.

Inline Math (Sans-Serif Style)

Modern and clean, the sans-serif style presents Euler’s identity as eiπ+1=0e^{i\pi} + 1 = 0, along with inline elements like ab\frac{a}{b} and a2+b2=c2a^2 + b^2 = c^2, giving a crisp, contemporary feel.

Inline Math (Cursive Style)

In a graceful cursive style, Euler’s identity eiπ+1=0e^{i\pi} + 1 = 0 is rendered beautifully. Notice how the inline fraction ab\frac{a}{b} and exponential a2+b2=c2a^2 + b^2 = c^2 take on an artistic flair.

Comprehensive Math Examples Template

This MDX document serves as a reusable template that demonstrates a wide variety of math expressions rendered beautifully with KaTeX. Use and modify these examples in your future blogs.

Inline Math

A classic inline equation: Euler’s identity is given by eiπ+1=0e^{i\pi} + 1 = 0.

You can also include inline fractions, like ab\frac{a}{b}, and exponentials, such as a2+b2=c2a^2 + b^2 = c^2.

Display Equations

Gaussian Integral

0ex2dx=π2\int_{0}^{\infty} e^{-x^2}\,dx = \frac{\sqrt{\pi}}{2}

Summation Formula

n=11n2=π26\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}

Quadratic Formula

x=b±b24ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

Limit Example

limx1x=0\lim_{x \to \infty} \frac{1}{x} = 0

Definite Integral

abf(x)dx\int_{a}^{b} f(x)\,dx

Aligned Equations

A system of equations rendered using the aligned environment:

a+b=c,x2+y2=z2,ddx(11x)=1(1x)2.\begin{aligned} a + b &= c, \\ x^2 + y^2 &= z^2, \\ \frac{d}{dx}\left(\frac{1}{1-x}\right) &= \frac{1}{(1-x)^2}. \end{aligned}

Matrices and Determinants

A 2×2 matrix and its determinant:

A=(1234)\mathbf{A} = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} det(A)=1423=2\det(\mathbf{A}) = 1\cdot4 - 2\cdot3 = -2

Piecewise Functions

A piecewise function example:

f(x)={x2,x0,x2,x<0.f(x) = \begin{cases} x^2, & x \geq 0, \\ -x^2, & x < 0. \end{cases}

Advanced Topics

Binomial Theorem

(a+b)n=k=0n(nk)ankbk(a + b)^n = \sum_{k=0}^{n} \binom{n}{k} a^{n-k} b^k

Differential Equation

A simple second-order homogeneous differential equation:

d2ydx2+ω2y=0\frac{d^2 y}{dx^2} + \omega^2 y = 0

Partial Differential Equation

The heat equation:

ut=α2u\frac{\partial u}{\partial t} = \alpha \nabla^2 u

Gamma Function

An integral representation of the Gamma function:

Γ(z)=0tz1etdt\Gamma(z) = \int_{0}^{\infty} t^{z-1} e^{-t}\,dt

Fourier Series

A Fourier series expansion:

f(x)=a0+n=1(ancosnπxL+bnsinnπxL)f(x) = a_0 + \sum_{n=1}^{\infty} \left( a_n \cos\frac{n\pi x}{L} + b_n \sin\frac{n\pi x}{L} \right)

Dot Product

The dot product of two vectors:

ab=abcosθ\mathbf{a} \cdot \mathbf{b} = \|\mathbf{a}\|\|\mathbf{b}\| \cos\theta

Continued Fraction

A continued fraction example:

x=1+11+11+11+x = 1 + \cfrac{1}{1 + \cfrac{1}{1 + \cfrac{1}{1 + \ddots}}}

Exponential Growth

The exponential growth model:

P(t)=P0ertP(t) = P_0 e^{rt}

Logarithmic Identity

A logarithmic property:

log(ab)=loga+logb\log(ab) = \log a + \log b

Trigonometric Identity

The Pythagorean identity:

sin2θ+cos2θ=1\sin^2\theta + \cos^2\theta = 1