# Writing matrix inside an equation

I wanna type this equation. Normal equation/matrix code not working.

• show the code you have that is not working, then someone could fix it. – David Carlisle Mar 15 '16 at 11:01
• You problably need to use align* from amsmath as equation does not support more than one line. And as David mentions, post your code, much easier for us to help – daleif Mar 15 '16 at 11:08
• Welcome to TeX.SX!! It is better to post a full minimal working example that starts with a \documentclass command, has a minimal preamble and then \begin{document}...\end{document}. Unless the problem is a compilation error, the code should compile and be as small as possible to demonstrate your problem. This makes it much easier for people to help you --- and much more likely that they will! – Andrew Mar 15 '16 at 11:10

Using align* with bmatrix can do the job (code hidden till you make a try!!):