According to the Montana Instructions:
A Resident of Montana is an individual that lives in or maintains a permanent home in Montana.
A Nonresident of Montana is an individual that is not a resident or part-year resident of the state.
A Part-Year Resident is an individual that moved into or out of Montana during the tax year with the intention of establishing permanent residency in the new State.
What if my spouse and I have different residency?
According to the Montana Form 2 Instructions, "Mark the Part-year Resident box if you are a part-year resident of Montana or if you are a Montana resident filing jointly with a nonresident or part-year resident spouse."