If A is matrix of order m×n and B is a matrix such that AB′ and B′A are both defined, then order of matrix B is