# Representing the Heart Shape Precisely

Valentine’s Day is over now^{1}; it was the day where school kids were expected to give cards to each other and everyone stuffed themselves with chocolate. Oh, and it had something to do with love, too, and with that, you find the famous heart symbol everywhere.

If you were asked to show the heart shape, you’d probably just draw it. Doing it that way is really imprecise; how is your valentine supposed to take you seriously when they see how you don’t care about the little details?

We mathematicians can do better: we can give you an equation.

I’ll try to help you out: I’ve listed some of the ways you can represent the heart shape with math or computers, in order of increasing sophistication, so you can show your valentine that you care.

### Emoticon

I’m sure you’re quite familiar with this one. It’s the best approximation of the heart shape using a minimal number of ASCII characters. Unlike most emoticons, this one is rotated π/2—er, 90°— clockwise from its upright position.

<3

### Georgian Letter

Really? Some people use this character, ghan, to approximate the heart shape. I’m sure they don’t even know how to write the letter properly (you start at the bottom-left and complete the character without lifting the pen). Ghan is the 26th letter of the Georgian alphabet; it makes the sound /ɣ/, the voiced velar fricative, which isn’t even found in English, although it could be approximated with “gh”. This character is found at Unicode point `U+10E6`

.

ღ

At least it’s upright and is only one character.

### Unicode Glyphs

You may have discovered that pressing `Alt+3` on Windows will produce a heart symbol. This is originated in the old IBM: you would input special characters using an Alt code. Today, the heart symbol has been incorporated into the Unicode pages in multiple points. Here are some of them:

♥`U+2665 BLACK HEART SUIT`

♡`U+2661 WHITE HEART SUIT`

💔`U+1F494 BROKEN HEART`

💕`U+1F495 TWO HEARTS`

Of course, since these are characters, you can colour them like you can with regular text: ♥

### Polar Plot

Now we get into the mathematical representations. In the Cartesian coordinate system, points are represented as (x,y), where the x- and y-axes are perpendicular to each other. In the polar coordinate system, points are represented as (r, θ), where r is the distance away from the origin (the “radius”), and θ is the angle counterclockwise from what would be the positive part of the x-axis on a Cartesian plot.

This curve, known as the cardioid, can be made by tracing a point on the circumerence of a circle rolling around another circle of equal size…

… or by taking the envelope of all the circles which pass through a given point on the circumference of a circle and whose centres lie on the circumference of the same circle.

### Two-dimensional Implicit Curve

An implicit equation is an equation in which one variable is not given as a function of another variable, often because it would be very difficult to express one variable explicitly or because the implicit relation is simpler; instead, both variables are used to define the function. The cardioid above can be implicitly defined in Cartesian space as .

### Parametric Curve

A parametric equation defines a curve by giving each component, *x* and *y* (and sometimes *z*), as functions of *t*. Curves that are very difficult or even impossible to express as explicit or implicit equations are often very simply expressed as a parametric equation. The cardioid above can be expressed as the parametric equation .

### Three-dimensional Implicit Surface

The last one for today. This one is perhaps the most impressive. If an implicit equation has three variables, the equation represents a three-dimensional surface.

Perhaps you can use one of these for your cards next year, and if you’re looking for a valentine, then maybe the one who recognizes the bare equation (without the plot) is the one for you.

Happy belated Valentine’s Day!

### Links

- Heart Shape [Wikipedia]
- Heart Curve [Wolfram MathWorld]
- Heart Curve [Mathematische Basteleien]
- Sage Mathematics Software

- ^ I had meant for this post to be up
*for*Valentine’s Day, but I wasn’t able to finish it in time.

I really like and very inspired… :)

Hee hee, thanks.

lol! speaking of valentines, how would you breakdown the mathematical proof the amount of chocolate consumed is directly proportional to the amount of pounds gained? hehe

Hmm, well, first you’d have to gather your data, and lots of it. Once you gather a sufficient number of samples, you perform regression, holding other factors constant. If the resulting equation is linear and there is no vertical shift (i.e. the line passes through the origin), then you can conclude that the relationship is directly proportional.

you know i was joking right?

Yes, I know, but if I can answer it anyway, then why not?

Hi, this is a very interesting article.

However the formula of the 3D heart doesn’t work.

Huh, I thought I tried it out when i made this post, but for some reason, Sage isn’t displaying anything (maybe it’s just my browser). What are you using? WolframAlpha doesn’t seem to like it, even though it’s a valid implicit equation and it used to work before I made this post.

I got this from Wikipedia and there was a WolframAlpha ad with a similar formula, so I do assert that it works.

Hi, thanks again for your article.

I’m using Raydiant to render it.

It gives a shape different from a heart.

May be your formula is lacking the term -x²z³?

Ah, yes, that’s it. I can’t believe I missed that. I’ve fixed the post. Thanks!

Thank you for putting this blog post together.

I really enjoyed reading it.

A very playful take on mathematics and what it can be used for.

Love the graphics!

I linked to it in a (Dutch) blog I am writing too.

Enjoy your day.