Find the inverse of the matrix $A=(a_{ij})\in M_n$ where $$ \begin{cases} a_{ij}=1, &i\geq j,\\ a_{ij}=0, &i<j. \end{cases} $$
The only method for finding inverses that I was taught was by finding the adjugate matrix. So $A^{-1}=\frac{1}{\det A}\operatorname{adj(A)}$
$$A=\begin{pmatrix} 1 & 0 &0 &\ldots &0\\ 1 & 1 & 0 &\ldots &0\\ 1 & 1 & 1 &\ldots &0\\ \vdots &\vdots & \vdots &\ddots & \vdots\\ 1 & 1 &1 & \ldots &1 \end{pmatrix}$$
This is a triangular matrix so $\det A=1.$ To find the adjugate I first need to find the cofactor matirx$(C)$ of $A$.
$$C=\begin{pmatrix} 1&-1&0&0&\ldots &0\\ 0 & 1& -1 &0&\ldots & 0\\ 0 & 0 & 1 & -1&\ldots &0\\ 0 & 0 & 0 &1 &\ldots &0\\ \vdots &\vdots &\vdots &\vdots&\ddots & \vdots\\ 0 & 0 &0 &0 &\ldots &1\end{pmatrix}$$
$$C^T=\operatorname{adj}(A)=\begin{pmatrix} 1 & 0 & 0 & 0&\ldots &0\\ -1 & 1& 0 & 0 &\ldots &0\\ 0&-1&1&0&\ldots &0\\ 0& 0 &-1 &1 &\ldots&0\\ \vdots &\vdots &\vdots &\vdots &\ddots&\vdots\\ 0&0&0&0&\ldots &1\end{pmatrix}=A^{-1}$$
Is this correct? Also, can I leave it like that or should I somehow write it more formally?
Yes, your inverse is correct. Let me show you an alternative approach of finding this inverse without the use of the adjugate matrix.
Denote $A_n$ as the $n \times n$ matrix that has elements $a_{ij} = 1$ if $i \geq j$, and $0$ otherwise. Then, $A_n$ can be constructed by applying the elementary row operations $$R_2 + R_1, R_3 + R_2, \ldots, R_n - R_{n-1}$$ to the identity matrix $I_n$. So, $$A_n = \prod_{i=1}^{n-1} E_i,$$ where $E_i$ is the elementary matrix representing the row operation $R_{i+1} - R_i$. Since det$(A)$ is nonzero, it is invertible, hence $$B_n = \left( A_n \right)^{-1} = \prod_{i = n-1}^{1} {E_i}^{-1},$$ where ${E_i}^{-1}$ is the row operation $R_{i+1} - R_i$. That is, $B_n$ can be constructed by applying the row operations $$R_n - R_{n-1}, R_{n-1} - R_{n-2},\ldots,R_2 - R_1$$ to the idenity matrix $I_n$. The inverse of $A_n$ is therefore given by the matrix
$$B_n = \begin{pmatrix} \phantom{-}1 & \phantom{-}0 &\phantom{-}0 &\ldots &0\\ -1 & \phantom{-}1 & \phantom{-}0 &\ldots &0\\ \phantom{-}0 & -1 & \phantom{-}1 &\ldots &0\\ \phantom{-}\vdots &\phantom{-}\vdots & \phantom{-}\vdots &\ddots & \vdots\\ \phantom{-}0 & \phantom{-}0 & \phantom{-}0 & \cdots &1 \end{pmatrix}.$$ In order to check that this is the correct inverse, you can use the identity $$A_nB_n = I_n.$$