Math Formulas

From inline formulas to matrices, use the AI assistant to quickly insert various LaTeX math formulas.

Inline Formula

Formulas wrapped in $ are embedded within the text line

Inline Formula
In @main.tex, replace 'energy formula' with the inline formula $E = mc^2$

Formulas wrapped in $ are embedded within the text line

Numbered Equation

The equation environment auto-numbers; use \label and \ref for cross-references

Numbered Equation
In the methods section of @main.tex, add the following formula using the equation environment:\nLoss function L = -\sum_{i} y_i \log(\hat{y}_i)

The equation environment auto-numbers; use \label and \ref for cross-references

Multiline Aligned Formula

The align environment supports multiline alignment; cases is suitable for piecewise functions

Multiline Aligned Formula
In @main.tex, add a piecewise function definition using the cases environment:\nf(x) = x^2 when x >= 0, f(x) = -x when x < 0

The align environment supports multiline alignment; cases is suitable for piecewise functions

Matrix

bmatrix for bracketed matrices, pmatrix for parenthesized matrices

Matrix
In @main.tex, add a 3x3 identity matrix using the bmatrix environment

bmatrix for bracketed matrices, pmatrix for parenthesized matrices

Related Documents