How do I build a matrix using two CSV columns in Google Sheets?

I collect CSV data via Google Forms into two spreadsheet columns. I need a formula to generate a matrix that counts item frequencies and row/column totals with multiple entries.

I used a pivot table in Google Sheets to build a matrix from two CSV columns with good results. The process involves selecting the range with your two columns and creating a pivot table that places one CSV value as the row label and the other as the column label. The counts then populate automatically in the table cells, which takes care of the frequency counts. Additionally, I found including subtotals directly in the pivot table setup was useful. This method is dynamic, updates automatically as new form entries arrive, and avoids the complexity of multiple nested formulas.