 How can I install the tz database on an embedded linux platform
 Cannot get ccache to work with ports in FreeBSD
 Can root test whether a monitor is connected?
 Best practice of single select row on table
 Drag n drop list element with multiple adjacent list
 Is there a term for “pretty much” first person?
 like a relieving? like a relief?
 What is the meaning of 'skr'?
 Do I use the singular or plural form of a noun when describing an attribute of a plural noun?
 The meaning of “The evening was voted a great success.”
 What factor dervies stock price and volume within a day
 Understanding Current Credit Card APRs and a CashPaying 5% “Credit Loan”
 Transferring personal debt from startup costs and operations to a corporation
 ! Missing } inserted.
} \end{thebibliography} l106  How to make some character “unreadable” as text in the pdf output but still visible?
 If ConTeXt, LuaTeX, etc. implement the TeX features from scratch
 from .hdf to .geoTIFF of product MOD35
 Selecting features by attributes using ogr2ogr?
 GRASS: How to rasterize 3 dimensional dxf to mask netCDF?
 Replacing old thermostat with 2 white wires for zone boiler heat
Subspaces in Mathematica
I'm working on a research project and I need to learn how to use Mathematica to calculate subspaces. Specifically I plan to solve the following operations and I would greatly appreciate if you could give me an example of how to solve it.
For example:
In the vector space $Ρ^n$, consider the sub space
$$S = \left\langle(1, 2,1,0, ..., 0), (0,1, 2,1,0, ..., 0) ... (0,0, ..., 1, 2,1)\right\rangle$$
Calculate equations defining $S$ for $n = 4, 8, 16, 20$.
Find generator subspaces of "magic" matrices of $2\times2$, $3\times3$ and $4\times4$ (a square matrix is called magic if the sums of the elements in each row, each column and in the diagonal are always the same)
Both questions ask to find bases for the kernels (null spaces) of matrices.
The first one asks for the kernel of $S(n)$ where, in Mathematica, $S(n)$ can be created as
s[n_Integer] /; n >= 3 :=
SparseArray[{Band[{1, 1}] > 1, Band[{1, 2}] > 2, Band[{1, 3}] > 1}, {n  2, n}];
For instance,

Both questions ask to find bases for the kernels (null spaces) of matrices.
The first one asks for the kernel of $S(n)$ where, in Mathematica, $S(n)$ can be created as
s[n_Integer] /; n >= 3 :=
SparseArray[{Band[{1, 1}] > 1, Band[{1, 2}] > 2, Band[{1, 3}] > 1}, {n  2, n}];
For instance,
NullSpace[s[4]]
returns
{{2, 1, 0, 1}, {3, 2, 1, 0}}
This means that every linear combination $(s_1, s_2, s_3, s_4)$ of rows of $S(4)$ satisfies two linear equations: $2s_1  s_2 + s_4=0$ and $3s_1+2s_2+s_3=0$ and, conversely, that every 4vector satisfying these two equations can be written as a linear combination of rows of $S(4)$.
There are two aspects to the second question. The first is to recognize that the constant (to which all the sums are equal) should be considered as a variable, along with the $n^2$ entries in the magic square of order $n$. This casts the question as giving a set of $n + n + 2$ equations in $n^2+1$ coefficients. The "generator subspace" of the
20180321 09:31:32 
A)
basis[std_, n_] :=
If[n < Length[std], "Invalid specs",
With[{null = ConstantArray[0, n  Length[std]},
Flatten /@ Permutations[Prepend[null, std]]]]
eqn[n_ /; (IntegerQ[n] && NonNegative[n])] := Array[x^(#  1) &, n]
combine[std_, n_] := eqn[n].# & /@ basis[std, n]
TableForm[Table[Row[{ToString[k] <> ">", combine[{1, 2, 1}, k]}],
{k, {4, 8, 16, 20}}], TableDepth > 1]
Gives:
(*
4>{12 x+x^2,x2 x^2+x^3}
8>{12 x+x^2,x2 x^2+x^3,x^22 x^3+x^4,x^32 x^4+x^5,x^42 x^5+x^6,x^52 x^6+x^7}
16>{12 x+x^2,x2 x^2+x^3,x^22 x^3+x^4,x^32 x^4+x^5,x^42 x^5+x^6,...}
20>{12 x+x^2,x2 x^2+x^3,x^22 x^3+x^4,x^32 x^4+x^5,x^42 x^5+x^6,...}
*)
B)
I have never encountered the term "generator subspace" before. Do you simply want a function that generates magic matrices? By generator subspaces, do you mean the column space of the magic matrix?
20180321 10:10:43