MathML Tests

This is my first foray into the MathML or Mathematical Markup Language...markup language.
Things will show up here from time to time documenting various tests.

Basic overview of MathML

I am no expert. The following, however, is a good start for anyone looking to get into this.

<math> opens up a MathML statement (it might be a good idea to also include "xmlns=""", just because)
<mi> represents an "identifier", which can be x, y, s, r, a, etc.
<mo> represents operators such as times, divided by, plus, minus, etc.
<mn> represents numbers
<mtext> represents text. When embedded into HTML or XHTML markup can be used within this tag.
<mrow> represents rows. This can be used to simulate formulas that involve an equation over another equation, plus other useful things. MUST BE CONTAINED WITHIN FRACTION TAGS.
<msup> and <msub> represents superscripts/subscripts. THE ELEMENT YOU ARE ATTACHING IT TO MUST BE CONTAINED WITHIN THIS TAG OR ERROR OCCURS.
<mfrac> represents fractions. Rows must be contained in this for it to work properly.
<msqrt> (<mroot>) represents roots/square roots.
<mfenced> represents fences (ie parentheses, square brackets, those kinds of things) around stuff.

Let's get started with the simplest algebraic equation ever: the Line

y = m x + b

But how useful is it if it's not an actual equation?
Let's say we have two points on a line, one is (1, 1), the other is (4, 8). Let's figure out the slope, which is m.

m = y2 - y1 x2 - x1

Which, in turn, becomes this:

m = 4 - 1 8 - 1

m = 3 7

And then to figure out the rest of the equation (ie the b), sub in one of the points.

y = 3 7 x + b

(1) = 3 7 (1) + b

1 = 3 7 + b

1 - 3 7 = b

4 7 = b

And the final equation is:  y = 3 7 x + 4 7
This page has been validated to XHTML 1.1, MathML 2.0, and SVG 1.1 conformance.
Valid XHTML 1.1Valid MathML 2.0Valid SVG 1.1