Question 1170572
Absolutely, let's break down this problem step by step.

**Part (1): Proving W is a Subspace and W = span(S)**

**1.1. Proving W is a Subspace**

To prove that W is a subspace of F^(n×n), we need to show three things:

* **Zero vector:** The zero matrix is in W.
* **Closure under addition:** If A and B are in W, then A + B is in W.
* **Closure under scalar multiplication:** If A is in W and c is a scalar in F, then cA is in W.

* **Zero Vector:** The zero matrix has all entries equal to 0, so its trace is 0. Thus, the zero matrix is in W.
* **Closure under Addition:** Let A, B ∈ W. Then tr(A) = 0 and tr(B) = 0.
    * Consider A + B. The (i, i)-th entry of A + B is a_ii + b_ii.
    * tr(A + B) = ∑ (a_ii + b_ii) = ∑ a_ii + ∑ b_ii = tr(A) + tr(B) = 0 + 0 = 0.
    * Thus, A + B ∈ W.
* **Closure under Scalar Multiplication:** Let A ∈ W and c ∈ F. Then tr(A) = 0.
    * Consider cA. The (i, i)-th entry of cA is ca_ii.
    * tr(cA) = ∑ (ca_ii) = c ∑ a_ii = c * tr(A) = c * 0 = 0.
    * Thus, cA ∈ W.

Therefore, W is a subspace of F^(n×n).

**1.2. Proving W = span(S)**

* **span(S) ⊆ W:** We need to show that every element in S is in W.
    * For E_ij (i ≠ j), the trace is 0 since all diagonal entries are 0. Thus, E_ij ∈ W.
    * For E_i (i = 2, ..., n), the trace is -1 + 1 = 0. Thus, E_i ∈ W.
    * Since every element in S is in W, any linear combination of elements in S (i.e., any element in span(S)) is also in W. Therefore, span(S) ⊆ W.

* **W ⊆ span(S):** We need to show that every matrix A ∈ W can be written as a linear combination of elements in S.
    * Let A = [a_ij] ∈ W. Then tr(A) = ∑ a_ii = 0.
    * We can write A as:
        * A = ∑ (a_ij * E_ij) + ∑ (a_ii * E_ii)
    * Since tr(A) = 0, we can express a_11 = -∑ (a_ii) for i = 2 to n.
    * We can then rewrite the diagonal terms as:
        * a_11 * E_11 + a_22 * E_22 + ... + a_nn * E_nn = ∑ (a_ii * (E_ii - E_11))
    * Each (E_ii - E_11) is simply E_i. Thus, A can be written as a linear combination of elements in S.
    * Therefore, W ⊆ span(S).

Since span(S) ⊆ W and W ⊆ span(S), we have W = span(S).

**1.3. Dimension of W**

* S is a linearly independent set.
* The number of E_ij matrices is n(n-1).
* The number of E_i matrices is n-1.
* Therefore, |S| = n(n-1) + (n-1) = n^2 - n + n - 1 = n^2 - 1.
* Since S is a basis for W, dim(W) = n^2 - 1.

**Part (2): Proving f(A) = tr(A)**

**2.1. Properties of f**

* f(AB) = f(BA) for all A, B ∈ F^(n×n).
* f(I) = n.

**2.2. Proving f(E_ij) = tr(E_ij)**

* For i ≠ j, tr(E_ij) = 0.
* Let A = E_ij and B = E_ji. Then AB = E_ii and BA = E_jj.
* f(AB) = f(E_ii) and f(BA) = f(E_jj).
* Since f(AB) = f(BA), f(E_ii) = f(E_jj).
* Let's consider f(E_ii).
    * f(I) = f(∑ E_ii) = ∑ f(E_ii) = n.
    * Since f(E_ii) = f(E_jj) for all i and j, f(E_ii) = 1 for all i.
    * Now consider i != j.
    * E_ij*E_kj = E_ik. If j = k, and if j != k, E_ij*E_kj = 0.
    * E_ji*E_ij = E_ii.
    * f(E_ij*E_ji) = f(E_ji*E_ij).
    * f(E_ii) = 1
    * If i != j, then f(E_ij)=0.
    * Thus, f(E_ij) = tr(E_ij) for all i, j.

**2.3. Proving f(E_i) = tr(E_i)**

* tr(E_i) = 0.
* E_i = E_ii - E_11.
* f(E_i) = f(E_ii - E_11) = f(E_ii) - f(E_11) = 1 - 1 = 0.
* Thus, f(E_i) = tr(E_i).

**2.4. Proving f(A) = tr(A)**

* Since S is a basis for W, any A ∈ W can be written as a linear combination of elements in S.
* f(A) = f(∑ c_ij * E_ij + ∑ c_i * E_i) = ∑ c_ij * f(E_ij) + ∑ c_i * f(E_i).
* Since f(E_ij) = tr(E_ij) and f(E_i) = tr(E_i), we have f(A) = ∑ c_ij * tr(E_ij) + ∑ c_i * tr(E_i) = tr(A).
* Thus, f(A) = tr(A) for all A ∈ W.
* Now, we need to show this holds for any A in F^(nxn).
* A = A_0 + c*I, where A_0 has trace 0, and c is the mean of the diagonal elements of A.
* f(A) = f(A_0) + f(cI) = tr(A_0) + c*f(I) = 0 + c*n.
* tr(A) = tr(A_0) + tr(cI) = 0 + c*n.
* Thus f(A) = tr(A) for any A in F^(nxn).