# Solved – Generating recommendations using matrix multiplications

The Mahout In Action (Chapter 6) book contains a recommendation method based on matrix multiplication that uses co-occurrence data (C) in combination with user preferences (U) to generate user recommendations (R).

Here's a small example to illustrate it. Say the co-occurrence matrix for 4 items is

`` C = [5 3 4 4       2 1 0 3       2 2 1 6       1 4 1 5] ``

and the user preference vector is

`` U = [2 3 0 0] ``

Here, we know the user's relative level of interest in the first two items and we are trying to gauge which one of the other two items can be used as a recommendation.

To find this, we first fill in 0s for those items and then perform a simple matrix multiplication and compute `R = C * U`

`` R = [19       7       10       14] ``

With this information, we ignore the first two terms (because we already know the level of the user's interest in them) and conclude that item #4 is a better recommendation compared to item #3.

Question:
Is there a "formal" name for this method or is this just a variant of collaborative filtering? Is there a mathematical basis (and/or intuition) for why such a method should work?

Compared to other recommendation methods (such as matrix factorization for instance), this approach is very simple because it only requires simple matrix multiplication. I'm wondering if there has been a study to compare such a simple method to the more complex ones.

Contents