Generate a matrix where entries are non-zero and determinant is non-zero I'm thinking about this: generating a $n\times n$ square matrix, whose entries are all non-zero, and the determinant is significantly different from zero. 
Suppose the matrix is $A$. I tried the following methods: 
Let $A_{ij} = (i-1)n+j$. Well this is apparently wrong after $n$ is larger than 3. The determinants would become zero. 
I then tried replacing $A_{ij}$ with $(A_{ij})^{1/2}$, but the determinant becomes a very small number.
As $n$ becomes very large, how can we still make sure the absolute value of determinant is not too small? 
 A: How about the matrix
$$A=\begin{bmatrix}2 & 1 & 1& \dots& 1 \\1& 2 & 1 &\dots& 1\\\vdots&\vdots&\vdots&\ddots&\vdots\\
1&1&1&\dots&2\end{bmatrix}$$
i.e. $A=[1,\dots 1]\cdot[1\dots1]^T + I$?
The determinant of $A$ is, I think, $n+1$ (i.e., $1$ more than the size of $A$), so it actually becomes larger as $n$ increases.
A: You can use a Householder matrix of the form $$Q = I - vv^T.$$
Here $I$ is the identity matrix of dimension $n$ and $v$ is a random vector which has been scaled such that $v^Tv = 2$. This choice ensure that $Q$ is orthogonal, i.e. $Q^TQ = I$. It follows that the determinant of $Q$ is $\pm 1$.
Observe, that if all components of $v$ are nonzero, then the off diagonal entries of $Q$ are nonzero, specifically $q_{ij} = - v_iv_j$. The diagonal entries are $q_{ii} = 1 - v_i^2$, so avoid $v_i = \pm 1$.
This construction gives you a well conditioned test matrix with a trivial inverse.
A: You can use the matrix
\begin{equation}
  A = 
  \begin{pmatrix}
    t & t & t & \cdots & t & t \\
    1 & 2 & 1 & \cdots & 1 & 1 \\
    1 & 1 & 2 & & 1 & 1 \\
    \vdots & \vdots & & \ddots & & \vdots\\ 
    1 & 1 & 1 & \cdots & 2 & 1 \\
    1 & 1 & 1 & \cdots & 1 & 2
  \end{pmatrix}
  \,,
\end{equation}
which has determinant $t$.
To show that the matrix has determinant $t$, start with the matrix
$[t e_1 | e_2 | \cdots | e_n]$, where $e_i$ is the $i$th unit vector. We have
$$
    \det [t e_1 | e_2 | \cdots | e_n] = t
    \,.
$$
The determinant is multilinear, giving that
$$
t
= \det [t e_1 | e_2 | \cdots | e_n]
= \det [t e_1 + e_2 | e_2 | \cdots | e_n]
= \cdots
= \det [t e_1 + e_2 + \cdots + e_n | e_2 | \cdots | e_n]
\,.
$$
If we define $v = t e_1 + e_2 + \cdots + e_n$, then
$$
t 
= \det[t v | e_2 | \cdots | e_n] 
= \det[t v | e_2 + v | \cdots | e_n + v] \,,
$$
where we used the multilinearity of the determinant, again. The matrix $[t v | e_2 + v | \cdots | e_n + v]$ is equal to $A$.
In general, starting with a diagonal matrix and using the multilinearity can be used to construct various matrices with prescribed determinant. 
