Matrix with integer entries, first row as $(1~2~3~\cdots~n)$, and determinant $k$ Let $n\ge2$ be an integer. Given an integer $k$ does there exist an $n\times n$ matrix $A$ with integer entries such that $\mathrm{det}(A)=k$ and the first row of $A$ is $(1~2~3~\cdots~n)$?
As much as I could think, we can always obtain the other rows of $A$ by Gram Schmidt orthogonalization starting with the given row, hence getting an orthogonal matrix with determinant $1$, but this matrix doesn't have integer entries.
 A: You can set the first row to be $(1, \dots n)$ as desired. Then, fill every other row except the last one with $1$s in the diagonal, and $k$ is the lower-right corner where we place $k$. This matrix will be upper triangular, and since the diagonal consists of $n-1$ ones and one copy of $k$, it will have determinant $k$. 
Formally, consider the upper triangular matrix $M \in \mathbb{R}^{n\times n}$ defined by: $M_{1j} = j,$  $M_{ij} = \delta_{ij} \ $ if  $1 < i < n$, and $M_{nj} =  k\delta_{nj}$. This matrix verifies that its first row is $(1 \dots n)$, and is upper triangular with $1$s in the diagonal except for the lower-right corner, in which $M_{nn} = k$. Therefore,
$$
\det(M) = \prod_{i=0}^n M_{ii} = k
$$
A: Consider the matrix such that $a_{i,j}=$:


*

*$j$ if $i=1$

*$0$ if $i> 1$ and $j=0$

*$k$ if $i=2$ and $j=2$

*$1$ if  $i=j$ and $i\geq 3$

*$0$ if $i>1$ and $j>1$ and $i\neq j$


If we calculate the determinant by iterating over the first row you only get one non-zero summand and it is $1\times k$
A: Perhaps an example is clear? For $n = 4$, consider the matrix
$$ M = \begin{pmatrix} 1 & 2 & 3 & 4 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & k \end{pmatrix}$$
Since the determinant of an upper-triangular matrix is the product of the diagonal elements, we are done.
