# Matrix Completion with constraints

Given a matrix $M \in \mathbb{R^{m \times n}}$ whose some entries in $\Omega$ are missing, I'm interested in filling in the matrix (Matrix Completion). I know a natural approach is to seek the lowest rank matrix $\hat{M}$ that interpolates the known entries of $M$. I know a way to solve this problem is to solve the following minimization problem (Maximum Margin Matrix Factorization)

$\min_{A \in \mathbb{R}^{m \times r}, B \in \mathbb{R}^{n \times r}} \|P_\Omega(M) - P_\Omega(AB^T)\|^2_F + \lambda(\|A\|^2_F + \|B\|^2_F)$

Where $\hat{M} = A B$. I know the problem above can be solved by using SVD or ALS.

But I was wondering what if the elements of $M$ have some constraint such as $~C M = 0_{m \times n}$, where $C \in \mathbb{R^{m \times m}}$, i.e., $C \hat{M} = C (AB) = 0$. How could I solve the Matrix Completion with this new constraint? Is it possible to solve it by using ALS?

In this case, try adding a penalty to the loss function e.g. $\lambda \|CAB\|_F^2$ . I think the gradient of the penalty term with respect to A or B can be calculated analytically. It should work in the gradient as a shrinking force to keep your solution within the set that satisfy the constraints. This time, again with ALS.