Secret messages hidden inside equations

October 1st, 2007 | Categories: general math, math software, mathematica, matlab | Tags:

At the moment I am writing an introductory Mathematica course and was recently looking for inspiration for potential exercises. One website I came across (I have lost the link unfortunately) suggested that you get something interesting looking if you plot the following equation over the region -3<x<3, -5<y<5. It also suggested that you should only plot the z values in the range 0<z<0.001.

\light f(x,y)=e^{-x^2-\frac{y^2}{2}} \cos (4 x)+e^{-3 \left((x+0.5)^2+\frac{y^2}{2}\right)}

Suitably intrigued, I issued the required Mathematica commands and got the plot below which spoke to me in a way that no equation ever has before.

So now I have a question – What other messages could one find hidden inside equations like this? For example, is it possible to generate a three letter word with a relatively simple equation such as the one above? Of course if you were allowed to use very complex equations (and make use of Fourier transforms maybe) then I guess you could spell out whatever you choose but that’s no fun.

If anyone finds other such messages in simple(ish) equations then please let me know.

  1. Amanda
    October 7th, 2007 at 17:57
    Reply | Quote | #1

    Like it! I suppose it’s a new take on “Hello World” for the advanced user!

  2. October 10th, 2007 at 03:38
    Reply | Quote | #2

    have you plotted its derivative?

  3. October 16th, 2007 at 11:42
    Reply | Quote | #3

    It’s like a really advanced version of writing “hello” on a digital calculator.

    *goes and dusts off his TI-83*

  4. November 8th, 2007 at 21:48
    Reply | Quote | #4

    Here’s a really weird one – I haven’t tried it myself, but it’s almost unbelievable:
    If I’m reading right, the formula actually plots itself. Hope you like.

  5. Andrea
    August 23rd, 2008 at 00:57
    Reply | Quote | #5

    Math is behind everything!
    I love it!

    November 29th, 2009 at 17:05
    Reply | Quote | #6

    are you still intrested?? let me khow i have some very very cool stuff

  7. November 30th, 2009 at 18:33
    Reply | Quote | #7

    Yep, I’m still interested :)

  8. June 11th, 2010 at 05:42
    Reply | Quote | #8

    EXQUISITE ! …… that f(x,y) looks more like a function straight our of ‘Potential Theory’, then again I guess it is more aesthetic ! :-)

    I guess that it should be possible to do on MATLAB.

  9. November 7th, 2010 at 07:41
    Reply | Quote | #9

    Can we make a ‘HELLO’ …. ? …. ;) (well…. this may be the start to a new encryption method – via MATLAB ….. LOL ! )

  10. June 19th, 2011 at 20:00


    you can check this post in (the blog of a friend, not mine) where he discusses parametric plots of words:

    You have to scroll down a little first.



  11. Wolf
    June 19th, 2011 at 20:21

    It is definitely an interesting thought towards the realm of steganography :) Not quite encryption/cryptography, but very interesting.

    I am also interested in using infinite (transcendental) sequences as keys or for hiding messages if given offsets (similar to knowing the x,y,z ranges to plot).

  12. Rafael
    June 19th, 2011 at 20:38
  13. June 19th, 2011 at 20:54

    Handcrafted in 12 minutes:






    I leave the world as an excercise

  14. June 19th, 2011 at 21:01

    the 18s should be 17s

  15. iliis
    June 19th, 2011 at 21:11

    I thinkt this one also produces an interesting graph: (2x^2+y^2+z^2-1)^3-x^2z^3/10-y^2z^3=0

  16. June 19th, 2011 at 21:17

    this may be salutary for students because it illustrates:
    1) moving functions around
    2) squeezing functions
    3) adding parts by adding functions
    4) (non-normalized) variants of the normal distribution

    PS: the 18s should be 17s

  17. June 19th, 2011 at 21:17

    and here is the idea behind it:

    | | |– | | |–|
    |-| |– | | | |
    | | |– |– |– |–|

  18. June 20th, 2011 at 10:26

    Here you can try out the 3d functions:^%28-x^2-100*y^2%29%2Be^%28-100*%28x-1%29^2-y^2%2F2%29%2Be^%28-100*%28x%2B1%29^2-y^2%2F2%29

    Increase grid size!
    For easier viewing paste each letter individually.

  19. June 20th, 2011 at 10:27

    This site is useful as well:

  20. Matt Heath
    June 20th, 2011 at 13:53

    An inequality rather than an equation but Tupper’s self-referential formula is pretty impressive

  21. June 20th, 2011 at 15:04

    According to the mathworld page you linked to ‘The formula itself is a general purpose method of decoding a bitmap stored in the constant k, so it could actually be used to draw any other image’.

    So, the image is actually contained in the number


    and not in the formula. So, it’s cool but not VERY cool IMHO :)

  22. Rebecca
    May 15th, 2017 at 21:09

    simplify -2i+u>-5u