Is a spectrahedron's boundary almost always "smooth"? A spectrahedron is a convex set defined by a linear matrix inequality (LMI). 
Is the boundary of such a set almost always smooth? 
By "smooth" I mean that it admits a tangent hyperplane at any point of the surface. I say "almost" because, for the special case of the polytope, the boundary has many "edges". In this special case, the answer would be no.
 A: There are many interesting examples where there are singularities on the border. E.g. spectrahedra describing decompositions of polynomials as sums of squares (s.o.s.) of polynomials have singularities corresponding to minimal possible number of  squares in such decompositions. 
Specifically, if $f(x_1,...,x_n)=\sum_k q_k(x_1,...,x_n)^2$ then $f=X^\top A X$, where $A$ is a positive semidefinite symmetric matrix and $X$ is the vector of monomials in $x_j$ of degree half the degree of $f$. All such $A$ for a given $f$ form a compact spectrahedron.
A: Let $\mathrm{Sym}^2(\mathbb{R}^n)$ be the $\binom{n+1}{2}$ dimensional vector space of $n \times n$ symmetric matrices and let $P \subset \mathrm{Sym}^2(\mathbb{R}^n)$ be the cone of positive semidefinite matrices. A spectrahedron is the intersection of $P$ with an affine linear space $L$. One reasonable interpretation of the "almost always" in your question is "except for a measure $0$ subset of the Grassmannian of $d$-dimensional affine subspaces of $\mathrm{Sym}^2(\mathbb{R}^n)$. With that interpretation, the answer is "yes" for $d \leq 2$, but "no" for $d \geq 3$.
The boundary $\partial (P \cap L)$ is $\partial P \cap L$. The boundary $\partial P$ is singular along the $\binom{n+1}{2}-3$ dimensional space $Q$ of positive semidefinite matrices of rank $\leq n-2$, and smooth at the matrices of rank $n-1$. If $L$ passes through $Q$ then $\partial P \cap L$ is almost surely singular at $Q \cap L$; if $L$ misses $Q$ then $L$ is likely to be singular.
Basic dimension counting (like the proof of Bertini's theorem, though this is in the real setting) shows that, since $Q$ has codimension $3$, a positive volume set of $L$ planes meets $Q$ for $d \geq 3$, but only (using Sard's theorem) a measure $0$ set for $d \leq 2$.
