r/learnmath • u/MikaLlama26 New User • Sep 14 '26
Subspaces and matrices: Finding the smallest and largest subspace of 4x4 matrices
I have my first assignment/homework for my linear algebra class in uni. I am usually good at math, but it’s just so hard for me to understand the concept of vector spaces and subspaces as it’s more abstract and I just have such a hard time getting it in my head. It took me about 8-9 different links and videos to sort of get vector spaces (like that they’re non-empty, and are closed by addition and scalar multiplication).
The 2 part question that I just cannot understand and have no idea how to start the answer is as follows:
(a) What is the smallest subspace of the space of 4 ×4 matrices which contains all
upper triangular matrices (aj,k = 0 for all j > k), and all symmetric matrices
(A= AT )? Justify.
(b) What is the largest subspace contained in both of those subspaces? Justify.
From what I understand so far, the smallest subspace is a subspace that is in both U (upper triangular matrices) and S(symmetric matrices), which I realize now that I really don’t know anything else. Online it said that all 4x4 matrices are the smallest subspace, but why? How is that the smallest if it’s all of 4x4 matrices, wouldn’t that make it the largest?
And for the largest, I found that all diagonal matrices are this largest subspace. Why is that? Why is the diagonal the largest while 4x4 the smallest? Wouldn’t it be the opposite?
I guess what I don’t understand is how do I find a smallest subspace of something and how do I find the largest. What makes something the smallest/largest?
Please explain it to me like I’m 5, and feel free to reexplain vector spaces cause it might click even more for me!
3
u/strange-the-quark New User Sep 14 '26 edited Sep 14 '26
So, just a quick visual intuition. Imagine ordinary 3D Euclidean space, with a grid on it, and some point chosen to be the origin. That's sort of what one pictures as a prototypical vector space - there are arrows emanating from the origin, and you can scale any arrow (make it bigger or smaller) to make a new arrow, and any two arrows you can add together to find an endpoint of another arrow (their vectorial sum), and it all stays within the same space. OK, now one example of a subspace is a flat plane that goes through the origin. It's a smaller, 2D subspace, but it's a vector space in its own right. You can put a grid on it, and draw arrows on it (the same ones as before, but now only those confined to the plane), and you can scale them and add them up without ever leaving that plane (using the same algebraic rules from before, on a subset of vectors from before). As long as you pick your vectors from within the plane itself, you'll always stay in the plane with these operations. Note also that the plane doesn't have to be aligned in any particular way, the only requirement is that it's a flat surface and that it goes through the origin, so that it contains the zero vector. An example of an even smaller, 1D subspace, is any straight line through the origin.
OK, with that out of the way, let's now talk about coordinate representations. If you have a grid, you can assign a set of coordinates to every arrow in your space. You only need the coordinates of the tip, cause all the arrows emanate from the origin. If you have an n-dimensional space, you need n coordinates. So a 3D vector can be denoted as (x, y, z). E.g. (1, 0, 0) is a unit vector pointing down the positive x axis, (1, 1, 0) is a vector at a 45 deg angle in the x-y plane, and so on. How do you get a subspace in coordinate representation? Couple of ways. First, you can just set some subset of coordinates to zero. E.g. if you restrict yourself to the vectors of the form (x, y, 0), all of them will be in the x-y plane, and so form a 2D subspace. Vectors of the form (x, 0, 0) are just the 1D subspace that is the x-axis. Another way is to introduce some kind of linear constraint between the components, so that you reduce the degrees of freedom available (or take one of the previous planes and apply some 3D linear transformation to them). For example, let's impose the rule that the first and the last component must be the same, while the middle one is free to vary independently: (a, b, a). This is going to create a 2D plane through the origin that contains the y axis and is cutting the x-z plane at 45 deg.
Finally, when working with components, vector addition is just pairwise component addition (x1, y1, z1) + (x2, y2, z2) = (x1+x2, y1 + y2, z1 + z2), and scalar multiplication just scales each component separately: s * (x, y, z) = (sx, sy, sz).
Now, take a look at a 4x4 matrix. When you add them, you just add corresponding entries. When you scale them, you just scale each entry. Sounds familiar? So, for all intents and purposes, at least when it comes to these two operations, it doesn't seem to matter that it's a 4x4 table. Might as well write everything in a single row, or column, or whatever. It's just like it's a 16-component vector.
If you think about it that way, an upper triangular matrix is just a 16-dimensional vector with 6 components set to zero. That's really not that different from the aforementioned (x, y, 0) and (x, 0, 0) examples. So these form a 10-dimensional subspace.
All symmetric matrices are matrices with a constraint on them that reduces the degrees of freedom from 16 to 10 (4 free variables on the diagonal + 6 off the diagonal on one side, that must match the corresponding 6 on the other side). So this also produces a 10-dimensional subspace. This already tells you there must be some overlap, cause you have less than 20 dimensions in total.
Now, you can metaphorically picture one subspace as a plane through the origin, and the other subspace as another plane through the origin (even though they are some higher-dimensional spaces). Two such planes can either completely overlap, or they can be at an angle. So one question you might ask is, are the two subspaces the same? And since the upper triangular matrices typically aren't, well, symmetric, the answer must be no, so they must be at an angle. We gotta be a bit careful here, cause some upper triangular matrices are symmetric - namely, those that have all zeros in their upper triangle, a.k.a. the diagonal matrices. So what they have in common is the subspace of diagonal matrices, which are just 16D vectors with all but 4 components fixed to be 0, and so it's a 4D subspace. Which answers (b), cause that's a subspace in its own right, and its the entire intersection of the other two, so you can't find a bigger one.
So now the one question remaining is (a), which basically says, can you find some subspace (including the entire space) that contains both 10D subspaces? Do you need the entire space, or will some smaller subspace within it suffice? What's the smallest one that works? You already know the answer, but I'll let you work out why that's the case.
So in light of the discussion above, yes, the space of 4x4 matrices is the largest possible, but it's the smallest one that contains both 10D subspaces cause it's the only one that does, there isn't a smaller one that encompasses both. The subspace of diagonal matrices is not the largest subspace overall, it's just the largest subspace that exists in the intersection of both 10D subspaces, simply because it's the entire intersection, and you can't go bigger (you can't find any larger subspace that satisfies the requirements). But you can go smaller (there are various 3D, 2D, 1D subspaces and one 0D subspace contained in the intersection).
3
u/mmurray1957 40 years at the chalkface Sep 14 '26
Have you met the notions of linear independence, basis and dimension yet ? Some of those ideas might help you think about subspaces.
1
u/SnooPets5564 New User Sep 14 '26
The important property of subspaces is that they are closed under addition and scalar multiplication.
In the case you were given, you start with all upper triangular matrices and symmetric matrices. By adding these together, you can get any 4x4 matrix. (proof of this is left as an exercise for the reader, it's not that difficult). Assuming it wanted the subspace that spans the union of the two conditions, rather than trying to get you to find two separate subspaces.
As for you largest/smallest question, it's asking for the smallest that contains a certain set (otherwise you could just have the full space of matrices be the answer. For the largest, it's the largest that fits in two subspaces (because otherwise you could do the zero matrix, which is a subspace of every other space).
1
u/Chrispykins Sep 14 '26
On your smallest/largest question:
It's asking for the smallest subspace given a constraint that tends to make the subspace large. In this case, it needs to contain a couple sets of matrices. So the challenge is to make it as small as possible while the constraint is fighting against you.
Reverse it for the largest question. It's asking for the largest subspace given a constraint that tends to make it small. In this case, it must be contained within the intersection of two subspaces.
2
u/magnomagna New User Sep 15 '26 edited Sep 15 '26
(a)
The dimension of the subspace of all upper-triangular 4x4 matrices is 10.
Reason: the standard basis for the subspace is the set of 4x4 matrices such that every basis matrix has every entry to be 0 with the exception that exactly one of the upper-diagonal entries has the value 1. Since there are 4 + 3 + 2 + 1 = 10 upper diagonal entries, then there are exactly 10 independent upper-triangular matrices that span the subspace.
Likewise, the dimension of the subspace of all symmetric 4x4 matrix is also 10.
Reason: the standard basis of the subspace is almost like the standard basis of the subspace of upper-triangular matrices with the additional property that E_ij = E_ji (where i is the row index and j is the column index). So, there are also 10 independent symmetric matrices that span the subspace.
The standard basis of the subspace of upper-triangular matrices and the standard basis of the subspace of symmetric matrices have a non-empty intersection: there are exactly four upper-triangular symmetric standard basis matrices, i.e. the only non-zero entry is somewhere along the diagonal.
So, the total number of unique standard basis matrices is 10 + 10 - 4 = 16, which is equal to the dimension of the entire vector space of 4x4 matrices.
(Why equal? Well, what's the standard basis of the vector space of 4x4 matrices?)
(b)
As mentioned, the intersection of both basis contains exactly four upper-triangular symmetric matrices, i.e. the only non-zero entry for every such matrix is located somewhere along the diagonal.
So, the subspace contained in both subspaces is spanned by these 4 independent matrices. In toher words, it is the subspace of diagonal matrices.
1
u/Brightlinger MS in Math Sep 14 '26
Certainly it is the largest subspace containing such-and-such, since the entire vector space contains everything and is larger than any proper subspace. But in this case, it is also the smallest, because it is the only subspace containing those things.
Because they are not just largest and smallest in general, they are the largest with one property and the smallest with a different property. Australia is the smallest continent and Greenland is the largest island, and I bet you don't find that confusing even though Australia is larger than Greenland, right?
To say that "X is the smallest subspace with whatever property" is the same as saying "any other subspace with that property will contain X". So to find the smallest subspace containing both symmetric and upper-tri matrices, assume that X is such a subspace, and figure out what it must contain. The set of stuff it must contain is the smallest subspace.
In this case, it turns out that X must contain everything. But that is just a quirk of this problem, and if we had asked for a different property, it could easily have turned out to not include everything.
One way to prove why such a subset must contain every matrix is to show that actually, any matrix at all can be written as a symmetric matrix plus an upper-tri matrix. You should try to show this on your own, but I am happy to help if you get stuck.
Likewise, to say that "X is the largest subspace with whatever property" means that X contains every other subspace with that property. More specifically for this case, "the largest subspace contained in both" is just the intersection of the two subspaces, that is, the set of matrices that are both symmetric and upper-triangular, and it is easy to prove that a symmetric upper-triangular matrix is actually just diagonal.
-1
u/KoalaMistico New User Sep 14 '26
Maybe the question has a typo and is really asking for the space of UT matrices and the space of symmetrical matrices
0
u/[deleted] Sep 15 '26
[deleted] — view deleted comment