Adding one row and column to a matrix

rm = RotationMatrix[θ, {0, 0, 1}];
rm2 = RotationMatrix[I θ, {0, 0, 1}]; 

1. ArrayFlatten

ArrayFlatten[{{1, 0}, {0, rm}}] // MatrixForm

enter image description here

ArrayFlatten[{{rm2, 0}, {0, 1}}] // MatrixForm

enter image description here

2. PadRight + PadLeft

PadRight[{{1}}, {4, 4}] + PadLeft[rm, {4, 4}] // MatrixForm

enter image description here

PadLeft[{{1}}, {4, 4}] + PadRight[rm2, {4, 4}] // MatrixForm

enter image description here

You can also do

MatrixForm /@ {Prepend[UnitVector[4, 1]] @ PadLeft[rm, {3, 4}],
   Append[UnitVector[4, 4]] @ PadRight[rm2, {3, 4}]} // Row

or

MatrixForm /@ {MapAt[1 &, {1, 1}]@PadLeft[rm, {4, 4}],
   MapAt[1 &, {-1, -1}]@PadRight[rm2, {4, 4}]} // Row

or

MatrixForm /@ {ReplacePart[ {1, 1} -> 1] @ PadLeft[rm, {4, 4}],
   ReplacePart[ {-1, -1} -> 1] @ PadRight[rm2, {4, 4}]} // Row

to get

enter image description here

3. ArrayPad

MatrixForm /@ {Prepend[UnitVector[4, 1]] @ ArrayPad[rm, {{0}, {1, 0}}],
   Append[UnitVector[4, 4]] @ ArrayPad[rm2, {{0}, {0, 1}}]} // Row

enter image description here

4. SparseArray`SparseBlockMatrix

SparseArray`SparseBlockMatrix[{{1, 1} -> {{1}}, {2, 2} -> rm}] // MatrixForm

enter image description here

SparseArray`SparseBlockMatrix[{{1, 1} -> rm2, {2, 2} -> {{1}}}] // MatrixForm

enter image description here


matrix = RotationMatrix[θ, {0, 0, 1}];
matrix1 = SparseArray[{Band[{1, 1}] -> {matrix, {{1}}}}];
matrix2 = SparseArray[{Band[{1, 1}] -> {{{1}}, matrix}}];
matrix // MatrixForm
matrix1 // MatrixForm
matrix2 // MatrixForm