horizontal and vertical dash lines in between homogeneous transformation matrix

i am new to latex and how do O write this in latex please? I just know how to write simple matrices. This matix includes both horizontal and vertical dash lines and lower row has four columns. R(q) is 3x3 matrix and p(q) is a 3x1 matrix.

The arydshln package provides the command \hdashline (a generalization of \hline) and the intercolumn separator type : (a generalization of |). I suggest you use them in conjunction with nested array environments.
\documentclass{article}
$\renewcommand{\arraystretch}{1.5} \left[\begin{array}{@{}c:c@{}} R(q) & p(q) \\ \hdashline \begin{array}{@{}ccc@{}} 0 & 0 & 0 \end{array} & 1 \end{array}\right]$