Solve fruit puzzles with matrices

Source image

Introduction

🥥+🍎+🍌=? | You can solve it all in the same systematic way, so you don’t have to specifically solve each of them with an individual frame of work. Have you seen those math problems with fruits on them?

What would you learn?

  • The basic for linear equations
  • Put in practice linear algebra
  • Formulate equations with matrices

@Alfredo Maussa


Step process

17/04/2020

Recovered from Medium

  • Put all the fruits on the left side of each equation sorted.
  • Add the same fruits together with explicit number.
  • Group in quantity Vs. fruits as vectors.
  • Write them as a matrix multiplication.
  • Solve the linear equation Ax=b.
  • Map the result using the linear equation solution.

Example

Let’s take the first puzzle image at the beginning of this post and solve it.

The first step:

Put all the fruits on the left side of each equation sorted. It’s almost done, let’s sort it with the following order: [🍎,🍌,🥥]:

The second step:

Add the same fruits together with explicit number. To avoid confusion, let’s write the coefficients explicitly and prepare it for the next step.

The third step:

Group in quantity Vs. fruits as vectors. We could ose dot product notation to write the same information as vectors (Here x denotes dot product).

The fourth step:

Write them as a matrix multiplication. A matrix multiplication, at the end is a group of dot products.

The fifth step:

Solve the linear equation Ax=b. There are multiple ways of solving this. The best is to apply a combination of them taking care of the difficulty.

For simple matrices you should use substitution and isolate the pivots. See Gauss Jordan Elimination Through Pivoting. For more difficult matrices if you want to calculate it with mental skills. I recommend you to use the transpose the Adjoint of the matrix, which is more directly through determinants.

The last step:

Map the result using the linear equation solution. Having each fruit value we could make a simple dot product to find the puzzle answer.