Matthew is a young kid who discovers the Jinni's secret when he walks in and sees the Jinni molding metal links for a necklace with his bare hands. The Jinni swears him to secrecy, and makes the kid his apprentice.
Similar to the Golem and Anna, the Jinni acts as a mentor figure to Matthew. Matthew runs to the Jinni when his mother dies, because he has no one else to turn to. Unfortunately, Matthew is so young that he thinks the Jinni can use his magic powers to bring his mother back to life. The Jinni scares him away to teach him a lesson.
They end up making amends later, and the Jinni takes Matthew to live with his grandmother in Europe. We don't know if they'll ever see each other again. Maybe if there's a sequel, Matthew will show up older, wiser, and a more developed character instead of a flat one.