added examples to dual_matrix function