# How to determine cluster on EM-Gaussian Mixture clustering with 2 or more variables

I'm trying to compute EM Gaussian Mixture clustering algorithm. As I found in Bishop(2009), it explained the algorithm. Which is we have E-step and M-step in the iteration process. And we could compute the responsibilities for component $k^{th}$ for data point $\textbf{x}_n$ where denoted as $\gamma (z_{nk})$.

$\gamma (z_{nk}) = \frac{\pi_k N(\textbf{x}_n | \mu_k , \sum_k)} {\sum^{K}_{j=1} \pi_j N(\textbf{x}_n | \mu_j , \sum_j)}$

As I understood, the $\gamma (z_{nk})$ is in 2D matrix form where the row shows the data point and column shows the cluster. After the final iteration, we can determine the cluster for each data point by take the maximum value for each row. However, I'm trying to compute 2 variables, which is I have to expand the matrix into 3D, and my question is how can I figure out the final cluster for each data point since each variable produces different cluster.

For example,