How to write mathematics on Medium

Tyler Neylon
Mar 17, 2016 · 6 min read

Inline expressions

Displayed expressions

The same post as seen on two different devices. The text in the image doesn’t scale with the main text.

Software to help generate math images

Geometric diagrams

var svg = document.getElementById('svg')
var svgNS = svg.namespaceURI
function addAttributes(elt, attr) {
for (var key in attr) {
elt.setAttribute(key, attr[key])
return elt

function add(eltName, attr) {
var elt = document.createElementNS(svgNS, eltName)
if (attr) addAttributes(elt, attr)
return elt
var myStyle = {stroke: '#666', fill: 'transparent'}
var circle = add('circle', myStyle)
addAttributes(circle, {cx: 50, cy: 50, r: 10})


Thanks to Jean Hsu

Tyler Neylon

Written by

Machine learning engineer; math for fun.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade