what does in \begin{array}{ccccc} what does the cccccc do and how is the number of characters determined? for example, do I need 5 c's for a matrix that has 5 columns or something?
Yes, the number of letters in the second set of brackets indicates the number of columns. You can list either a "c", "r", or "l" to signify the justification of the numbers in the matrix. So, for example, in the command you listed, you have five columns with the numbers centered in each column.