# How to visualize a low-rank matrix decomposition?

In a numerical low rank decomposition, whether it is non-negative matrix factorization (NMF), or binary matrix factorization (BMF), or non-negative sparse PCA, we have two low-rank matrices to approximate the original matrix by multiplying:

$$M = U \times P$$

whose dimensions are

$$M \in \mathbb{R}^{n \times m},\qquad U \in \mathbb{R}^{n \times k},\qquad P \in \mathbb{R}^{k \times m}.$$

I'm wondering if there are any elegant ways of visualizing the decomposition result.

I have two initial thoughts:

1. Intuitively, we can draw the three matrices into gridded boxes and fill in each cell by its value. A darker cell means a higher value while a lighter a lower.

2. We can take $U$ and $P$ as two assignment matrices that map two dimensions into several latent labels. Thus according to the different labels we can divide the two dimensions into various sets.

Do you have any idea on this? Or have you ever seen any visualization work on this?

• I am unable to multiply your $U$ by your $P$ unless $k$ happens to equal $m$, which I doubt was your intention. Hmm... it looks like your editors have screwed things up. I'll fix that particular error, but please consider double-checking that this post reflects what you originally wrote. – whuber Dec 30 '16 at 21:17