Find the dimensions of the following

A)The space of n x n matrices all of whose elements are 0 except possibly the diagonal elements.
B)The space of n x n upper triangular matrices
C))The space of n x n symmetric matrices
D)The space of n x n diagonal matrices

A) The space of n x n matrices all of whose elements are 0 except possibly the diagonal elements has dimensions n.

B) The space of n x n upper triangular matrices has dimensions (n * (n + 1)) / 2.

C) The space of n x n symmetric matrices has dimensions (n * (n + 1)) / 2.

D) The space of n x n diagonal matrices has dimensions n.

A) The space of n x n matrices all of whose elements are 0 except possibly the diagonal elements:

To find the dimensions of this space, we need to count the number of independent variables that can be chosen. In an n x n matrix, there are n diagonal elements, and each can be chosen as an independent variable. The remaining (n^2 - n) elements are always 0. Therefore, the dimension of this space is n.

B) The space of n x n upper triangular matrices:
An upper triangular matrix is a square matrix in which all the entries below the main diagonal are zero. To find the dimensions of this space, we need to count the number of independent variables that can be chosen. In an n x n upper triangular matrix, the diagonal elements can be chosen as independent variables, and the remaining elements above the main diagonal are always 0.

For the first row, we have n choices (corresponding to the first diagonal element). For the second row, we have (n - 1) choices (corresponding to the second diagonal element), and so on. Therefore, the dimension of this space is 1 + 2 + 3 + ... + n, which is equal to (n * (n + 1)) / 2.

C) The space of n x n symmetric matrices:
A symmetric matrix is a square matrix that is equal to its transpose. To find the dimensions of this space, we need to count the number of independent variables that can be chosen.

For each row, we can choose elements from the diagonal and above the diagonal. The number of choices in the first row is n, the second row is (n - 1), and so on, until the nth row has 1 choice. Therefore, the dimension of this space is 1 + 2 + 3 + ... + n, which is equal to (n * (n + 1)) / 2, the same as the upper triangular matrices.

D) The space of n x n diagonal matrices:
A diagonal matrix is a square matrix in which all the entries outside the main diagonal are zero. To find the dimensions of this space, we need to count the number of independent variables that can be chosen.

For each row, we can choose elements only from the diagonal. This gives us n choices for each row. Therefore, the dimension of this space is n.