The meaning of を in あなたは何をしていますか?


What is the function of を in the sentence:

[code]

    あなたは何をしていますか?
    
[/code]

Why can't it be written without it, like:

[code]

    あなたは何していますか?
    
[/code]




'[を](http://jisho.org/search/%E3%82%92)' is a particle that is used mainly as
an _object particle_ to

> indicate a **direct object** of action.

Therefore, it needs to be used as you are asking what the object of _doing_ is
in the question.

> I am doing my homework.

could be translated to

> [宿題]{しゅくだい} **を** しています.

In formal Japanese, it is better not to omit 'を' in the sentence.

