Detailed derivation of multiplicative update rules for NMF

The goal of Non-negative Matrix Factorization (NMF) is to decompose a matrix of non-negative (i.e., zero or positive) elements into a product of two factor matrices, both of them containing also non-negative elements. It is common to use the notation X for the input matrix (of size M ×N), W for the first factor matrix (sometimes called basis matrix or feature matrix, of sizeM ×K) and H for the second factor matrix (sometimes called coefficient matrix or activation matrix, of size K ×N). The resulting factorization is often approximate: