1 Introduction

The concept of positive bases was developed in 1954 by Davis [11] and their properties were further developed in [19, 23, 24]. A positive basis of a space is a set of vectors than spans the space using only positive coefficients in their linear combinations, as opposed to standard bases that allow negative coefficients as well. It is known that the number of vectors in a positive basis of \(\mathbb {R}^n\) is between \(n+1\) and 2n inclusive. This result is proved in [11] and an alternate short proof for the upper bound has been published in [2]. A positive basis of size \(n+1\) is called a minimal positive basis and one of size 2n is called a maximal positive basis. If \(n+1<s<2n\), then the positive basis is known as a positive basis of intermediate size. The structure of minimal and maximal positive bases is now well-understood and has been meticulously characterized in [21]. However, the structure of intermediate positive bases is not as obvious and few results are available in the literature. This paper explores intermediate positive bases. It gives a definition of optimal positive basis and provides a method for constructing an optimal positive basis over a set of positive bases with nice structure. One of the most important results on the structure of intermediate positive bases is provided in [23, Theorem 1], which we use in proving the main results of this paper.

In the last twenty years, the topic of positive bases and positive spanning sets has become an active area of research, due to its value in derivative-free optimization (DFO). As mentioned in [7, 17], the key property of positive bases is that they always contain a descent direction for any function whenever the gradient of the function exists and is non-zero at the point of interest. Positive bases are employed in direct search methods such as pattern search [4, 10, 25, 27], grid-based methods [8, 9] and many others [1, 3, 5, 15, 16, 26]. They have also be used in non-DFO methods. For example, a feasible descent direction method that relies on the properties of positive spanning sets and minimizes a class of nonsmooth, nonconvex problems with linear constraints has been proposed in [6].

The cosine measure is used to indicate the quality of a positive basis [25] and it is this measure that determines whether the basis is optimal. Roughly speaking, a high value of the cosine measure indicates that the positive basis covers the space more uniformly. In general, having higher cosine measure is preferable and convergence properties of certain DFO algorithms depend on the cosine measure of the positive basis employed. A deterministic algorithm to compute the cosine measure of any finite positive spanning set in finite time is introduced in [12]. Another method for computing the cosine measure of any finite set has also been introduced in [22].

In [20], the maximal cosine measures for maximal and minimal positive bases are found and the structure of positive bases attaining these upper bounds for the cosine measure are characterized. However, the maximal cosine measures for intermediate positive bases was not developed. In this paper, we investigate this issue in depth. We define two subsets of positive bases with nice properties and investigate the problem of finding an intermediate positive basis with maximal cosine measure on these two subsets. A formula that gives the value of the maximal cosine measure is presented. We develop properties of this type of intermediate positive bases and show that the algorithm to compute the cosine measure introduced in [12] can be simplified in the presence of such positive bases. A table describing the structure of this type of positive bases for some dimensions n and intermediate sizes s is provided. A MATLAB code to generate such positive bases is developed and available on request.

This paper is organized as follows. In Sect. 2, the main definitions and background results necessary to understand this paper are presented. In Sect. 3, we investigate the properties of intermediate positive bases with maximal cosine measure in \(\mathbb {R}^3\). Then we consider a general space \(\mathbb {R}^n\) in the second part of Sect. 3. Finally, in Sect. 4 we summarize the main results of this paper and discuss future research directions.

2 Preliminaries

Table 1 provides a summary of notation for quick reference. Its contents are more fully defined in the sequel.

Table 1 Summary of notation

To begin, we present the definition and three important properties of a positive spanning set. The space considered throughout this paper is \(\mathbb {R}^n.\)

Definition 1

(Positive span and positive spanning set of \(\mathbb {R}^n\)) The positive span of a set of vectors \(\mathbb {S}=\begin{bmatrix}d_1&d_2&\cdots&d_s \end{bmatrix}\) in \(\mathbb {R}^n\), denoted \({{\,\textrm{pspan}\,}}(\mathbb {S})\), is the set

$$\begin{aligned} \{v \in \mathbb {R}^n: v=\alpha _1d_1+ \dots +\alpha _s d_s, \alpha _i\ge 0, i=1, 2, \dots , s\}. \end{aligned}$$

A positive spanning set of \(\mathbb {R}^n\) is a set of vectors \(\mathbb {S}\) such that \({{\,\textrm{pspan}\,}}(\mathbb {S})=\mathbb {R}^n.\)

It is convenient to regard a set of vectors as a matrix whose columns are the vectors in the set. The following three lemmas are used in Sect. 3.

Lemma 2

[7, Theorem 2.3] Let \(\mathbb {S}=\begin{bmatrix} d_1&\cdots&d_s \end{bmatrix}\) be a set of vectors that spans \(\mathbb {R}^n.\) Then \(\mathbb {S}\) positively spans \(\mathbb {R}^n\) if and only if there exist real scalars \(\alpha _1, \dots , \alpha _s>0\) such that \(\sum _{i=1}^s \alpha _id_i=0.\)

Lemma 3

[21, Theorem 2.3] If \(\mathbb {S}=\begin{bmatrix}d_1&\,&\cdots&d_s \end{bmatrix}\) positively spans \(\mathbb {R}^n\), then \(\mathbb {S}\setminus \{d_i\}\) linearly spans \(\mathbb {R}^n\) for any \(i\in \{1, \dots , s\}\).

Lemma 4

[7, Theorem 2.3] Let \(\mathbb {S}=\begin{bmatrix} d_1&\cdots&d_s \end{bmatrix}\) be a set of nonzero vectors in \(\mathbb {R}^n\). Then the set \(\mathbb {S}\) is a positive spanning set of \(\mathbb {R}^n\) if and only if for every nonzero vector v in \(\mathbb {R}^n\), there exists an index \(i \in \{1,2, \dots , s\}\) such that \(v^\top d_i<0.\)

To define a positive basis of \(\mathbb {R}^n\), we introduce the concept of positive independence.

Definition 5

(Positive independence) A set of vectors \(\mathbb {S}=\begin{bmatrix}d_1&d_2&\cdots&d_s \end{bmatrix}\) in \(\mathbb {R}^n\) is positively independent if \(d_i \notin {{\,\textrm{pspan}\,}}(\mathbb {S}\setminus {d_i})\) for all \(i \in \{1, 2, \dots s\}.\)

Definition 6

(Positive basis of \(\mathbb {R}^n\)) A positive basis of \(\mathbb {R}^n\) of size s, denoted \(\mathbb {D}_{n,s}\), is a positively independent set whose positive span is \(\mathbb {R}^n\).

Equivalently, a positive basis of \(\mathbb {R}^n\) can be defined as a set of nonzero vectors of \(\mathbb {R}^n\) whose positive span is \(\mathbb {R}^n,\) but for which no proper subset exhibits the same property [7]. For convenience, we assume that the vectors in a positive basis are unit vectors in this paper.

It is known that the size s of a positive basis is between \(n+1\) and 2n inclusive. We say that the positive basis \(\mathbb {D}_{n,s}\) is of intermediate size if \(n+1< s < 2n.\) Note that there is no positive basis of intermediate size when \(n \in \{1,2\}.\) When \(s=n+1,\) we say that the positive basis is of minimal size. A positive basis of minimal size in \(\mathbb {R}^n\) is written \(\mathbb {D}_n\) (the second subscript referring to the size may be omitted when \(s=n+1\)). When \(s=2n,\) we say that the positive basis is of maximal size. If \(s>n+1,\) we say the positive basis \(\mathbb {D}_{n,s}\) is non-minimal.

The principal tool for determining the quality of a positive basis and how well it covers the space \(\mathbb {R}^n\) is the cosine measure.

Definition 7

(Cosine measure) The cosine measure of a finite set \(\mathbb {S}\) of nonzero vectors is defined by

$$\begin{aligned} {{\,\textrm{cm}\,}}(\mathbb {S})=\min _{\begin{array}{c} \Vert u \Vert =1\\ u \, \in \, \mathbb {R}^n \end{array}} \max _{d \, \in \, \mathbb {S}} \frac{u^\top d}{\Vert d \Vert }. \end{aligned}$$

Values of the cosine measure near zero suggest the positive spanning property is approaching a deterioration. A high value of cosine measure indicates that the vectors in the set more uniformly cover the space; in other words, the vectors are spaced farther away from one another. Note that given any positive basis \(\mathbb {D}_{n,s}\) where \(n\ge 2\), the cosine measure is bounded by \(0< {{\,\textrm{cm}\,}}(\mathbb {D}_{n,s})<1\) [12, Proposition 10]. When \(n=1,\) there is only one positive basis of unit vectors:

$$\begin{aligned} \mathbb {D}_{1,2}&=\begin{bmatrix} 1&-1\end{bmatrix}. \end{aligned}$$

Its cosine measure is equal to 1. The positive basis \(\mathbb {D}_{1,2}\) is both minimal size and maximal size.

Definition 8

(Optimal positive basis) A positive basis \(\mathbb {D}_{n,s}\) is optimal over a nonempty set \(\mathbb {P}\) if

$$\begin{aligned} {{\,\textrm{cm}\,}}(\mathbb {D}_{n,s})\ge {{\,\textrm{cm}\,}}(\mathbb {D}'_{n,s}) \end{aligned}$$

for any positive basis \(\mathbb {D}'_{n,s}\) in \(\mathbb {P}.\)

The set of positive bases containing all positive bases of size s in \(\mathbb {R}^n\) is denoted \(\mathcal {P}_{n,s}.\) When we write that \(\mathbb {D}_{n,s}\) is optimal without mentioning the set considered, it is implied that the set considered is \(\mathcal {P}_{n,s}.\) The structure and properties of optimal bases of minimal size and maximal size are well-known and have been rigorously proved in [20]. We denote by \(\mathring{\mathbb {D}}_n\) an optimal positive basis of minimal size. Note that in \(\mathbb {R},\) the only positive basis of unit vectors \(\mathbb {D}_{1,2}=\begin{bmatrix} 1&-1 \end{bmatrix}\) is an optimal positive basis of minimal size and hence, is denoted by \(\mathring{\mathbb {D}}_1.\)

Next, we define the cosine vector set, the active set of vectors and present a very important property of the active set.

Definition 9

(The cosine vector set) Let \(\mathbb {S}\) be a set of non-zero vectors in \(\mathbb {R}^n\). The cosine vector set of \(\mathbb {S}\), denoted \(c\textbf{V}(\mathbb {S})\), is defined as

$$\begin{aligned} c\textbf{V}(\mathbb {S})=\underset{\begin{array}{c} \Vert u \Vert =1\\ u \, \in \, \mathbb {R}^n \end{array}}{{{\,\textrm{argmin}\,}}}\max _{d\, \in \, \mathbb {S}} \frac{u^\top d}{\Vert d \Vert }. \end{aligned}$$

Definition 10

(The all activity set of vectors) Let \(\mathbb {S}\) be a set of unit vectors in \(\mathbb {R}^n\) and let \(u \in c\textbf{V}(\mathbb {S}).\) The active set of vectors in \(\mathbb {S}\) on u denoted \(\mathcal {A}(u,\mathbb {S})\), is defined as

$$\begin{aligned} \mathcal {A}(u,\mathbb {S})=\left\{ d \in \mathbb {S}:d^\top u={{\,\textrm{cm}\,}}(\mathbb {S}) \right\} . \end{aligned}$$

The all activity set is defined as

$$\begin{aligned} \textbf{A}(\mathbb {S})=\bigcup _{u \in c\textbf{V}(\mathbb {S})} \mathcal {A}(u,\mathbb {S}). \end{aligned}$$

Proposition 11

Let \(\mathbb {D}_{n,s}\) be a positive basis of \(\mathbb {R}^n.\) Then the all activity set \(\textbf{A}(\mathbb {D}_{n,s})\) contains a basis of \(\mathbb {R}^n.\)

Proof

This follows directly from [12, Corollary 18], as \(\mathcal {A}(u,\mathbb {D}_{n,s})\) contains a basis of \(\mathbb {R}^n\) for each u in \(c\textbf{V}(\mathbb {D}_{n,s}).\) \(\square\)

The next step is to introduce a deterministic algorithm to compute the cosine measure of any positive basis. First, let us recall the definition of a Gram matrix.

Definition 12

(Gram matrix) Let \(\mathbb {S}=\begin{bmatrix}d_1&d_2&\cdots&d_s\end{bmatrix}\) be a set of vectors in \(\mathbb {R}^n\) with dot product \(d_i^\top d_j\). The Gram matrix of the vectors \(d_1, d_2, \dots , d_s\) with respect to the dot product, denoted \(\textbf{G}(\mathbb {S}),\) is given by \(\textbf{G}(\mathbb {S})=\mathbb {S}^\top \mathbb {S}.\)

Algorithm 1 below was introduced in [12] as a method of finding the cosine measure of a positive basis.

figure a

In [12], it was proved that if \(\mathbb {B}_n\) is a basis of \(\mathbb {R}^n\) contained in \(\mathcal {A}(u,\mathbb {D}_{n,s})\) for some \(u \in c\textbf{V}(\mathbb {D}_{n,s}),\) then the cosine measure of the positive basis \(\mathbb {D}_{n,s}\) is given by

$$\begin{aligned} {{\,\textrm{cm}\,}}(\mathbb {D}_{n,s})&=\frac{1}{\sqrt{\textbf{1}^\top \textbf{G}(\mathbb {B}_n)^{-1} \textbf{1}}}. \end{aligned}$$
(1)

Therefore, an optimal positive basis has a structure that maximizes (1), or equivalently, that minimizes \(\textbf{1}^\top \textbf{G}(\mathbb {B}_n)^{-1} \textbf{1}\). The next lemma shows that any basis of \(\mathbb {R}^n\) contained in an optimal minimal positive basis \(\mathring{\mathbb {D}}_n\) is in the all activity set.

Lemma 13

Let \(\mathring{\mathbb {D}}_{n}\) be an optimal minimal positive basis in \(\mathbb {R}^n.\) Let \(\mathbb {B}_n\) be any basis of \(\mathbb {R}^n\) contained in \(\mathring{\mathbb {D}}_n.\) Then \(\mathbb {B}_n\) is in \(\textbf{A}(\mathring{\mathbb {D}}_n)\).

Proof

This follows from [20, Theorem 1], as all Gram matrices of a basis \(\mathbb {B}_n\) contained in \(\mathring{\mathbb {D}}_n\) are equal. It follows from Lemma 4 that \(\gamma _{\mathbb {B}_n}=\mathring{p}_{\mathbb {B}_n}\) for all bases \(\mathbb {B}_n\) (where \(\mathring{p}_{\mathbb {B}_n}\) is defined as in Algorithm 1). Therefore, any basis \(\mathbb {B}_n\) contained in \(\mathring{\mathbb {D}}_n\) is in \(\textbf{A}(\mathring{\mathbb {D}}_n).\) \(\square\)

Now we recall the definition of a principal submatrix and properties of positive definite matrices and positive semidefinite matrices.

Definition 14

(Principal submatrix) [13, Section 0.7.1] Let \(A \in \mathbb {R}^{n \times m}.\) For index sets \(\alpha \subseteq \{1, \dots , n\}\) and \(\beta \subseteq \{1, \dots , m\},\) we denote by \(A[\alpha , \beta ]\) the submatrix of entries that lie in the rows of A indexed by \(\alpha\) and the columns indexed by \(\beta .\) If \(\alpha =\beta ,\) the submatrix \(A[\alpha ,\alpha ]\) is a principal submatrix of A.

Lemma 15

[13, Obs. 7.1.2] Let \(A \in \mathbb {R}^{n \times n}\) be a real symmetric matrix. If A is positive definite, then all of its principal submatrices are positive definite.

Lemma 16

[13, Theorem 7.2.7] Let A be a symmetric matrix in \(\mathbb {R}^{n \times n}\). Then A is positive definite if and only if there is a matrix \(B \in \mathbb {R}^{m \times n}\) with full column rank such that \(A=B^\top B.\)

Lemma 17

[13, Theorem 7.2.1] A nonsingular symmetric matrix \(A \in \mathbb {R}^{n \times n}\) is positive definite if and only if \(A^{-1}\) is positive definite.

Note that Lemmas 16 and 17 explain why the value \(\gamma _{\mathbb {B}_n}\) defined in Algorithm 1 Step (1.1) is positive for any basis \(\mathbb {B}_n\) of \(\mathbb {R}^n.\) The last lemma of this section is helpful in finding the cosine measure of a positive basis \(\mathbb {D}_{n,s}\) when a basis \(\mathbb {B}_n \in \textbf{A}(\mathbb {D}_{n,s})\) is written as a block matrix.

Lemma 18

(Inverse of a block matrix)[18, Corollary 4.1] Let A be a symmetric invertible matrix and D be a symmetric matrix. The inverse of a positive definite matrix having the form

$$\begin{aligned} G=\begin{bmatrix}A&{}B^\top \\ B&{}D\end{bmatrix} \end{aligned}$$

is

$$G^{{ - 1}} = \left[ {\begin{array}{*{20}l} {A^{{ - 1}} + A^{{ - 1}} B^{{ \top }} (D - BA^{{ - 1}} B^{{ \top }} )^{{ - 1}} BA^{{ - 1}} } & { - A^{{ - 1}} B^{{ \top }} (D - BA^{{ - 1}} B^{{ \top }} )^{{ - 1}} } \\ { - D - BA^{{ - 1}} B^{{ \top }} )^{{ - 1}} BA^{{ - 1}} } & {(D - BA^{{ - 1}} B^{{ \top }} )^{{ - 1}} } \\ \end{array} } \right].$$

3 Main Results

In 1987, Romanowicz introduced the concepts of subbasis, subpositive basis and critical vectors [23]. The author used these concepts to characterize the structure of positive bases. As such, they are helpful to characterize the structure of any non-minimal positive basis.

Definition 19

(Subbasis and subpositive basis) A subset \(P_1 \in \mathbb {R}^{n \times m}, 1 \le m < n\) of a basis \(\mathbb {B}_n\) of \(\mathbb {R}^n\) is called a subbasis of a subspace \(L_1\) in \(\mathbb {R}^n\) if \({{\,\textrm{span}\,}}(P_1)=L_1.\)

A subset \(P_2 \in \mathbb {R}^{n \times r}, 2 \le r < s,\) of a positive basis \(\mathbb {D}_{n,s}\) is called a subpositive basis of a subspace \(L_2\) in \(\mathbb {R}^n\) if \({{\,\textrm{pspan}\,}}(P_2)=L_2.\)

A subpositive basis of a subspace L in \(\mathbb {R}^n\) is denoted \(\mathbb {D}^n_{m,r}\) where \(m=\dim (L)\) and r is the size of the subpositive basis. When \(m=n\) (i.e. the subspace is \(\mathbb {R}^n\) itself), we omit the superscript and write \(\mathbb {D}_{n,s}\). When the subpositive basis is of minimal size, we omit the size r in the subscript and write \(\mathbb {D}^n_{m}.\)

Example 20

Let \(\mathbb {D}_{3,5}=\begin{bmatrix} 1&{}0&{}-\frac{1}{\sqrt{2}}&{}0&{}0\\ 0&{}1&{}-\frac{1}{\sqrt{2}}&{}0&{}0\\ 0&{}0&{}0&{}1&{}-1 \end{bmatrix}.\) It can be proved that \(\mathbb {D}_{3,5}\) is a positive basis of \(\mathbb {R}^3\); the proof is omitted here. We see that

$$\begin{aligned} \mathbb {D}^3_{2}=\begin{bmatrix} 1&{}0&{}-\frac{1}{\sqrt{2}}\\ 0&{}1&{}-\frac{1}{\sqrt{2}}\\ 0&{}0&{}0 \end{bmatrix} \end{aligned}$$

is a subpositive basis of \(L_1=\{x \in \mathbb {R}^3:x_3=0\}\) and

$$\begin{aligned} \mathring{\mathbb {D}}^3_1=\begin{bmatrix}0&{}0\\ 0&{}0\\ 1&{}-1\end{bmatrix} \end{aligned}$$

is a subpositive basis of \(L_2=\{x \in \mathbb {R}^3:x_1=x_2=0\}.\)

Definition 21

(Critical set, critical vectors and complete critical set) Let \(\mathbb {D}_{n,s}\) be a positive basis of \(\mathbb {R}^n.\) Let C be a subset of \(\mathbb {R}^n.\) We say C is a critical set of \(\mathbb {D}_{n,s}\) if

$$\begin{aligned} {{\,\textrm{pspan}\,}}\left( (\mathbb {D}_{n,s} \setminus {\{d\}}) \cup C \right)&\ne \mathbb {R}^n \end{aligned}$$
(2)

for each \(d \in \mathbb {D}_{n,s}\). Elements of C are called critical vectors. The complete critical set is denoted \(C(\mathbb {D}_{n,s})\) and contains all critical sets C satisfying equation (2).

Note that \(\textbf{0}\in \mathbb {R}^n\) is a critical vector for every positive basis in \(\mathbb {R}^n.\) It is proved in [23] that for a minimal positive basis \(\mathbb {D}_n\) in \(\mathbb {R}^n, n \ge 2,\) we have

$$\begin{aligned} C(\mathbb {D}_{n})&=-\bigcup _{i \ne j} {{\,\textrm{pspan}\,}}\left( \mathbb {D}_{n,s} \setminus {\{d_i,d_j\}} \right) . \end{aligned}$$
(3)

Also, it is proved in [23] that a maximal positive basis \(\mathbb {D}_{n,2n}, n \ge 1,\) has the property

$$\begin{aligned} C(\mathbb {D}_{n,2n})&=\{ \textbf{0}\}. \end{aligned}$$

The following example provides the critical set of a minimal positive basis in \(\mathbb {R}^2.\)

Example 22

Consider the minimal (optimal) positive basis

$$\begin{aligned} \mathring{\mathbb {D}}_2&=\begin{bmatrix} d_1&d_2&d_3 \end{bmatrix} =\begin{bmatrix} 1 &{}-\frac{1}{2}&{} -\frac{1}{2} \\ 0 &{}\frac{\sqrt{3}}{2}&{}-\frac{\sqrt{3}}{2}\end{bmatrix}. \end{aligned}$$

It follows from (3) that

$$\begin{aligned} C(\mathring{\mathbb {D}}_2)=-{{\,\textrm{pspan}\,}}(d_1) \cup -{{\,\textrm{pspan}\,}}(d_2) \cup -{{\,\textrm{pspan}\,}}(d_3). \end{aligned}$$

Theorem 23 provides the general structure of a non-minimal positive basis in \(\mathbb {R}^n.\)

Theorem 23

(Structure of a non-minimal positive basis [23, Theorem 1]) Let \(n\ge 2\) and \(s \ge n+2\). The set of s vectors in \(\mathbb {R}^n\), \(D_{n,s}\), is a positive basis of \(\mathbb {R}^n\) if and only if \(D_{n,s}\) admits the partition

$$\begin{aligned} D_{n,s}&=\mathbb {D}^n_{m_1} \cup (\mathbb {D}^n_{m_2} \oplus c_1) \cup \dots \cup (\mathbb {D}^n_{m_q} \oplus c_{q-1}) \end{aligned}$$
(4)

where \(\mathbb {D}^n_{m_1}, \dots , \mathbb {D}^n_{m_q}\) are minimal subpositive bases of subspaces \(L_1, \dots , L_q\) of \(\mathbb {R}^n,\) \(\mathbb {R}^n=L_1 \oplus L_2 \oplus \dots \oplus L_q, L_i \cap L_j=\{\textbf{0}\}\) for \(i \ne j,\) \(1 \le \dim L_i \le n-1,\) and \(c_j\) (\(j \in \{1, \dots , q-1\}\)) is a critical vector of the subpositive basis \(\mathbb {D}^n_{M_j, M_j+j}\) of the subspace \(L_1 \oplus \dots \oplus L_j\) of \(\mathbb {R}^n\), where

$$\begin{aligned} \mathbb {D}^n_{M_1,M_1+1}=\mathbb {D}^n_{m_1} \end{aligned}$$

and

$$\begin{aligned} \mathbb {D}^n_{M_j}=\mathbb {D}^n_{m_1} \cup (\mathbb {D}^n_{m_2} \oplus c_1) \cup \dots \cup (\mathbb {D}^n_{m_j} \oplus c_{j-1}) \end{aligned}$$

for all \(j \in \{2, \dots , q\}, q\ge 2.\)

We provide an example to clarify the meaning of Theorem 23.

Example 24

Consider sets of five vectors in \({\mathbb {R}}^3.\) First, the set

$$\begin{aligned} {D_{3,5}}=\begin{bmatrix} d_1&d_2&d_3&d_4&d_5 \end{bmatrix}= \begin{bmatrix}1&{}-{\frac{1}{2}}&{}-{\frac{1}{2}}&{}0&{}0\\ 0&{}{\frac{\sqrt{3}}{2}}&{}-{\frac{\sqrt{3}}{2}}&{}0&{}0\\ 0&{}0&{}0&{}1&{}-1\end{bmatrix} \end{aligned}$$

is a positive basis of \({\mathbb {R}}^3,\) since \({\mathring{\mathbb {D}}}_2^3=\begin{bmatrix} d_1&d_2&d_3 \end{bmatrix}\) is a minimal (optimal) subpositive basis of the subspace \(L_2= \left\{ x \in \mathbb {R}^3:x_3=0 \right\} ,\) the set \(\mathring{\mathbb {D}}_1^3=\begin{bmatrix} d_4&d_5\end{bmatrix}\) is a minimal (optimal) positive basis of the subspace \(L_1=\{x \in \mathbb {R}^3:x_1=x_2=0\},\) \(\mathbb {R}^3= L_2 \oplus L_1, L_2 \cap L_1=\textbf{0}\) and \(\textbf{0}\) is a critical vector for every positive basis. Hence, \(D_{3,5}\) admits the partition

$$\begin{aligned} D_{3,5}=\mathring{\mathbb {D}}_2^3 \cup \mathring{\mathbb {D}}_{1}^3. \end{aligned}$$

Second, the set

$$\begin{aligned} {D'}_{3,5}&=\begin{bmatrix} d_1&d_2&d_3&d_4'&d_5'\end{bmatrix} =\begin{bmatrix} 1 &{}-\frac{1}{2}&{} -\frac{1}{2}&{} -1&{}-1\\ 0&{}\frac{\sqrt{3}}{2}&{}-\frac{\sqrt{3}}{2}&{}0&{}0\\ 0&{}0&{}0&{}1&{}-1 \end{bmatrix} \end{aligned}$$

is a positive basis of \(\mathbb {R}^3.\) Notice \(c=\begin{bmatrix} -1&~0&~0 \end{bmatrix}^\top\) is a critical vector of the subpositive basis \(\mathring{\mathbb {D}}_2^3.\) Hence, \(D'_{3,5}\) can be written as the partition

$$\begin{aligned} D'_{3,5}&=\mathring{\mathbb {D}}^3_{2} \cup \left( \mathring{\mathbb {D}}^3_{1} \oplus c \right) . \end{aligned}$$

The following lemma determines the number of subpositive bases in a partition of a positive basis given in (4).

Lemma 25

Let \(\mathbb {D}_{n,s}\) be a non-minimal positive basis in \(\mathbb {R}^n.\) The number of subpositive bases \(\mathbb {D}_{m_j}\) in the partition (4) is

$$\begin{aligned} q=s-n. \end{aligned}$$

Proof

We have

$$\begin{aligned} \sum _{j=1}^q (m_j+1)&=s \text{ and } \sum _{j=1}^q m_j=n, \end{aligned}$$

where \(1 \le m_j \le n-1, n+1<s \le 2n.\) Hence,

$$\begin{aligned} s-n&=\left( \sum _{j=1}^q (m_j+1) \right) -n=q + \left( \sum _{j=1}^q m_j \right) -n = q. \end{aligned}$$

\(\square\)

In the remainder of this paper, we focus on the positive bases that can be partitioned such that the critical vectors \(c_j\) are all equal to \(\textbf{0}.\) We explain why we focus on this specific type of positive bases in the following pages.

Definition 26

(The set \(\varOmega _{n,s}\)) The positive basis \(\mathbb {D}_{n,s}\) of \(\mathbb {R}^n\) is in the set \(\varOmega _{n,s}\) if \(\mathbb {D}_{n,s}\) admits the partition

$$\begin{aligned} \mathbb {D}_{n,s}&=\mathbb {D}^n_{m_1} \cup \mathbb {D}^n_{m_2} \cup \dots \cup \mathbb {D}^n_{m_{s-n}} \end{aligned}$$

where \(\mathbb {D}^n_{m_1}, \dots , \mathbb {D}^n_{m_{s-n}}\) are minimal subpositive positive bases of the subspaces \(L_1, \dots , L_{s-n}\) respectively, \(\mathbb {R}^n=L_1 \oplus L_2 \oplus \dots \oplus L_{s-n},\) \(1 \le \dim L_i=m_i \le n,\) for all \(i \in \{1, \dots ,s-n\}\) and such that \(L_i \cap L_j=\{\textbf{0}\}\) for \(i \ne j\) whenever \(s-n \ge 2.\)

Note that the set \(\varOmega _{n,s}\) contains positive bases of all sizes: minimal, intermediate and maximal. Also, all maximal and minimal positive bases of \(\mathbb {R}^n\) are contained in \(\varOmega _{n,s}.\) That is, \(\varOmega _{n,n+1}=\mathcal {P}_{n,n+1}\) and \(\varOmega _{n,2n}=\mathcal {P}_{n,2n}.\) However, when \(n+1<s<2n,\) we have that \(\varOmega _{n,s}\) is a proper, nonempty subset of \(\mathcal {P}_{n,s}.\)

Corollary 27 follows directly from Theorem 23. It describes the structure of a basis \(\mathbb {B}_n\) in \(\mathbb {R}^n\) contained in a non-minimal positive basis \(\mathbb {D}_{n,s}\) contained in \(\varOmega _{n,s}\).

Corollary 27

Let \(\mathbb {D}_{n,s}\) be a positive basis of \(\mathbb {R}^n\) contained in \(\varOmega _{n,s}.\) Let \(\mathbb {B}_n\) be any basis of \(\mathbb {R}^n\) contained in \(\mathbb {D}_{n,s}.\) Then \(\mathbb {B}_n\) admits the partition

$$\begin{aligned} \mathbb {B}_n&=\mathbb {B}^n_{m_1} \cup \mathbb {B}^n_{m_2} \cup \dots \cup \mathbb {B}^n_{m_{s-n}} \end{aligned}$$

where \(\mathbb {B}^n_{m_i} \in \mathbb {R}^{n \times m_i}\) is a subbasis of the subspace \(L_i\) in \(\mathbb {R}^n\) for all \(i \in \{1, \dots , s-n\}\), \(\mathbb {R}^n=L_1 \oplus \dots \oplus L_{s-n},\) \(1 \le \dim L_i=m_i \le n,\) \(L_i \cap L_j=\{\textbf{0}\}\) for \(i \ne j\) (whenever \(s-n \ge 2\)) and such that \(\mathbb {B}^n_{m_i}\subset \mathbb {D}^n_{m_i}\) for all \(i \in \{1, \dots , s-n\}.\)

In Corollary 27, note that a subpositive basis \(\mathbb {D}^n_{m_i}\) contains \(m_i+1\) subbases of \(L_i\) (this follows from Lemma 3). Forming a set by picking one subbasis from each subspace \(L_i\) always forms a basis of \(\mathbb {R}^n.\) Hence, the number of bases of \(\mathbb {R}^n\) contained in a positive basis in \(\varOmega\) is

$$\begin{aligned}&\prod _{i=1}^{s-n}(m_i+1). \end{aligned}$$
(5)

For example, we obtain that there are \(n+1\) bases of \(\mathbb {R}^n\) in a minimal positive basis and \(2^n\) bases of \(\mathbb {R}^n\) in a maximal positive basis. This agrees with [12, Propositions 14,15]. We conclude this section by showing that Algorithm 1 developed in [12] can be simplified when \(\mathbb {D}_{n,s}\) is a positive basis of \(\mathbb {R}^n\) contained in \(\varOmega _{n,s}.\)

Proposition 28

(Property of a positive basis of \(\mathbb {R}^n\) contained in \(\varOmega _{n,s}\)) Let \(\mathbb {D}_{n,s}\) be a positive basis of \(\mathbb {R}^n\) contained in \(\varOmega _{n,s}.\) Let \(\mathbb {B}_n\) be a basis of \(\mathbb {R}^n\) contained in \(\mathbb {D}_{n,s}.\) Let \(u_{\mathbb {B}_n}\) be the unit vectors such that \(u_{\mathbb {B}_n}^\top \mathbb {B}_n=\gamma _{\mathbb {B}_n} \textbf{1}^\top\) (where \(\gamma _{\mathbb {B}_n}\) is defined as in Algorithm 1 Step (1.1)). Then

$$\begin{aligned} u_{\mathbb {B}_n}^\top d \le 0 \end{aligned}$$

for all vectors \(d \in \mathbb {D}_{n,s} \setminus \{\mathbb {B}_n\}\). Consequently, Steps (1.3),(1.4) in Algorithm 1 can be omitted and Steps (2.1),(2.2) become (respectively)

$$\begin{aligned} {{\,\textrm{cm}\,}}(\mathbb {D}_{n,s})&=\min _{\mathbb {B}_n \subset \mathbb {D}_{n,s}} \gamma _{\mathbb {B}_n}, \end{aligned}$$
(6)
$$\begin{aligned} c\textbf{V}(\mathbb {D}_{n,s})&=\{u_{\mathbb {B}_n}:\gamma _{\mathbb {B}_n}={{\,\textrm{cm}\,}}(\mathbb {D}_{n,s})\}. \end{aligned}$$
(7)

Proof

Let \(\mathbb {B}_n\) be any basis of \(\mathbb {R}^n\) contained in \(\mathbb {D}_{n,s}.\) By Corollary 27, \(\mathbb {B}_n\) can be written as \(\mathbb {B}^n_{m_1} \cup \dots \cup \mathbb {B}^n_{m_{s-n}}\) where \(\mathbb {B}^n_{m_i}\) is contained in the subpositive basis \(\mathbb {D}^n_{m_i}\) of the subspace \(L_i\) in \(\mathbb {R}^n.\) Let \(u_{\mathbb {B}_n}\) be the unit vector defined in Step (1.2) of Algorithm 1. Consider the minimal subpositive basis \(\mathbb {D}^n_{m_i}\) for some \(i \in \{1, \dots , s-n\}.\) We know that there is only one vector in the set \(\mathbb {D}^n_{m_i}\setminus \{\mathbb {B}^n_{m_i}\}.\) Denote this vector by d. We know that the projection of \(u_{\mathbb {B}_n}\) onto \(L_i,\) denoted \({{\,\textrm{proj}\,}}_{L_i} u_{\mathbb {B}_n}\) has dot product

$$\begin{aligned} \left( {{\,\textrm{proj}\,}}_{L_i} u_{\mathbb {B}_n} \right) ^\top d<0 \end{aligned}$$

whenever \({{\,\textrm{proj}\,}}_{L_i} u_{\mathbb {B}_n} \ne \textbf{0}\) by Lemma 4, and it is equal to zero when \({{\,\textrm{proj}\,}}_{L_i} u_{\mathbb {B}_n}=\textbf{0}.\) We obtain

$$\begin{aligned} u_{\mathbb {B}_n}^\top d=\left( {{\,\textrm{proj}\,}}_{L_i} u_{\mathbb {B}_n} \right) ^\top d \le 0. \end{aligned}$$

Therefore, \(u_{\mathbb {B}_n}^\top d \le 0\) for all \(d \in \mathbb {D}_{n,s} \setminus \{\mathbb {B}_n\}.\) From Sect. 2, we know that \(\gamma _{\mathbb {B}_n}>0\) for any basis \(\mathbb {B}_n\) contained in \(\mathbb {D}_{n,s}.\) It follows that \(\gamma _{\mathbb {B}_n}\) is the maximum value of the dot product between \(u_{\mathbb {B}_n}\) and the vectors in \(\mathbb {D}_{n,s}.\) Therefore, we may delete Steps (1.3), (1.4) and set \({{\,\textrm{cm}\,}}(\mathbb {D}_{n,s})\) and \(c\textbf{V}(\mathbb {D}_{n,s})\) as in (6) and (7), respectively. \(\square\)

Below is an abbreviated version of Algorithm 1 and the modified version based on Proposition 28, for comparison.

Algorithm 1

Algorithm 1a

Given \(\mathbb {D}_{n,s}\), a positive basis of size s in \(\mathbb {R}^n\):

Given \(\mathbb {D}_{n,s}\), a positive basis of size s in \(\mathbb {R}^n\):

1. For all bases \(\mathbb {B}_n\subset \mathbb {D}_{n,s}\), compute 

1. For all bases \(\mathbb {B}_n\subset \mathbb {D}_{n,s}\), compute 

(1.1) \(\gamma _{\mathbb {B}_n}=\frac{1}{\sqrt{\textbf{1}^\top \textbf{G}(\mathbb {B}_n)^{-1}\textbf{1}}}\)

(1.1) \(\gamma _{\mathbb {B}_n}=\frac{1}{\sqrt{\textbf{1}^\top \textbf{G}(\mathbb {B}_n)^{-1}\textbf{1}}}\)

(1.2) \(u_{\mathbb {B}_n}=\gamma _{\mathbb {B}_n}\mathbb {B}_n^{-\top } \textbf{1}\)

(1.2) \(u_{\mathbb {B}_n}=\gamma _{\mathbb {B}_n}\mathbb {B}_n^{-\top } \textbf{1}\)

(1.3) \(p_{\mathbb {B}_n}=\begin{bmatrix}p_{\mathbb {B}_n}^1\cdots p_{\mathbb {B}_n}^s \end{bmatrix}=u_{\mathbb {B}_n}^\top \mathbb {D}_{n,s}\)

 

(1.4) \(\mathring{p}_{\mathbb {B}_n}=\max _{1\le i \le s }p_{\mathbb {B}_n}^i\)

 

2. Return  

2. Return  

(2.1) \({{\,\textrm{cm}\,}}(\mathbb {D}_{n,s})=\min _{\mathbb {B}_n \, \subset \, \mathbb {D}_{n,s}} \mathring{p}_{\mathbb {B}_n}\)

\({{\,\textrm{cm}\,}}(\mathbb {D}_{n,s})=\min _{\mathbb {B}_n \subset \mathbb {D}_{n,s}} \gamma _{\mathbb {B}_n}\)

(2.2) \(c\textbf{V}(\mathbb {D}_{n,s})=\{u_{\mathbb {B}_n}:\mathring{p}_{\mathbb {B}_n}={{\,\textrm{cm}\,}}(\mathbb {D}_{n,s})\}\)

\(c\textbf{V}(\mathbb {D}_{n,s})=\{u_{\mathbb {B}_n}:\gamma _{\mathbb {B}_n}={{\,\textrm{cm}\,}}(\mathbb {D}_{n,s})\}\)

Comparing Algorithm 1 and 1a, it is clear that for each basis, Algorithm 1a saves \(s-n\) dot products and a max involving involving \(s-n+1\) values.

In the sequel, we consider positive bases in \(\varOmega _{n,s}.\) We begin by finding the structure of an optimal non-minimal positive basis in \(\mathbb {R}^3\) over \(\varOmega _{3,s}.\)

3.1 Optimality in \(\mathbb {R}^3\)

In \(\mathbb {R}^3,\) there is only one possible intermediate size: 5. Let \(\mathbb {D}_{3,5}\) be a positive basis contained in \(\varOmega _{3,5}.\) Then \(\mathbb {D}_{3,5}\) admits the partition

$$\begin{aligned} \mathbb {D}_{3,5}=\mathring{\mathbb {D}}^3_1 \cup \mathbb {D}^3_2 \end{aligned}$$

where \(\mathring{\mathbb {D}}^3_1\) is a minimal (optimal) subpositive basis of a subspace \(L_1\) in \(\mathbb {R}^3\) and \(\mathbb {D}^3_2\) is a subpositive basis of a subspace \(L_2\) in \(\mathbb {R}^3\) such that \(L_1 \oplus L_2 =\mathbb {R}^3,\) \(L_1 \cap L_2 = \{ \textbf{0}\}.\) Note that this is the only possible partition that includes at least two subpositive bases. Also, \(\mathbb {D}_{3,5}\) cannot contain more than two sub-positive bases. We can realign the positive basis \(\mathbb {D}_{3,5}\) so that \(\mathring{\mathbb {D}}^3_1\) is equal to

$$\begin{aligned} \mathring{\mathbb {D}}^3_1&=\begin{bmatrix} 0&{}0\\ 0&{}0\\ 1&{}-1 \end{bmatrix}. \end{aligned}$$

This realignnment does not affect the geometry of the positive basis in the sense that it does not change the values of the Gram matrix \(\textbf{G}(\mathbb {B}_3).\) Hence, it does not affect the cosine measure. It follows that any basis \(\mathbb {B}_3\) of \(\mathbb {R}^3\) contained in \(\mathbb {D}_{3,5}\) admits the partition

$$\begin{aligned} \mathbb {B}_3=\mathbb {B}^3_1 \cup \mathbb {B}^3_2 \end{aligned}$$

where \(\mathbb {B}^3_1=\pm \begin{bmatrix} 0&~0&~1 \end{bmatrix}^\top\) and \(\mathbb {B}^3_2\) is a subbasis of \(L_2\) contained in \(\mathbb {D}^3_2.\) We next show that the two subspaces \(L_1\) and \(L_2\) of \(\mathbb {R}^3\) must be orthogonal for \(\mathbb {D}_{3,5}\) to be optimal over \(\varOmega _{3,5}.\) First, we introduce a lemma that is used in the in the main proposition of this subsection.

Lemma 29

Let \(\mathbb {D}_{3,5}\) be a positive basis in \(\mathbb {R}^3\) contained in \(\varOmega _{3,5}\). By Proposition 11, we know that there is a basis of \(\mathbb {R}^3\) contained in \(\textbf{A}(\mathbb {D}_{3,5}).\) Let \(\mathbb {B}_3\) be a basis of \(\mathbb {R}^3\) contained in \(\textbf{A}(\mathbb {D}_{3,5})\) and admitting the partition \(\mathbb {B}_3=\mathbb {B}_2^3 \cup \mathbb {B}_1^3.\) Let \(v=(\mathbb {B}_2^3)^\top \mathbb {B}_1^3 \in \mathbb {R}^2.\) Then

$$\begin{aligned} \textbf{1}^\top \textbf{G}(\mathbb {B}_3)^{-1} \textbf{1}&=\textbf{1}^\top \textbf{G}(\mathbb {B}_2^3)^{-1} \textbf{1}+c \left( \textbf{1}^\top \begin{bmatrix} -\textbf{G}(\mathbb {B}_2^3)^{-1}v\\ 1\end{bmatrix}\right) ^2 \end{aligned}$$

where \(c=\left( 1-v^\top \textbf{G}(\mathbb {B}_2^3)^{-1}v \right) ^{-1}.\) Moreover,

$$\begin{aligned} \textbf{1}^\top \textbf{G}(\mathbb {B}_3) \textbf{1}&\ge \textbf{1}^\top \textbf{G}(\mathbb {B}_2^3)^{-1} \textbf{1}+1 \end{aligned}$$

with equality if and only \(v=\textbf{0}.\)

Proof

To make notation tighter, let \(\textbf{G}(\mathbb {B}_3)=\textbf{G}_3\) and \(\textbf{G}(\mathbb {B}^3_2)=\textbf{G}_2.\) By Lemma 18, the inverse of \(\textbf{G}_3\) is

$$\begin{aligned} \textbf{G}_3^{-1}&= \begin{bmatrix} \textbf{G}_2^{-1}+\textbf{G}_2^{-1}v\left( 1-v^\top \textbf{G}_2^{-1}v\right) ^{-1}v^\top \textbf{G}_2^{-1}&{}\quad -\textbf{G}_2^{-1}v\left( 1-v^\top \textbf{G}_2^{-1}v \right) ^{-1}\\ -\left( 1-v^\top \textbf{G}_2^{-1}v \right) ^{-1} v^\top \textbf{G}_2^{-1}&{}\left( 1-v^\top \textbf{G}_2^{-1}v \right) ^{-1} \end{bmatrix}. \end{aligned}$$

Once again to make notation tighter, let \(c=\left( 1-v^\top \textbf{G}_{2}^{-1}v\right) ^{-1} \in \mathbb {R}.\) We obtain

$$\begin{aligned} \textbf{G}_3^{-1}&=\begin{bmatrix} \textbf{G}_2^{-1}&{}\textbf{0}\\ \textbf{0}&{}0\end{bmatrix} +c \begin{bmatrix} \textbf{G}_2^{-1}vv^\top \textbf{G}_2^{-1}&{}-\textbf{G}_2^{-1}v\\ (-\textbf{G}_2^{-1}v)^\top &{}1 \end{bmatrix} \\&=\begin{bmatrix} \textbf{G}_2^{-1}&{}\textbf{0}\\ \textbf{0}&{}0\end{bmatrix}+c \begin{bmatrix}-\textbf{G}_2^{-1}v\\ 1 \end{bmatrix} \begin{bmatrix} (-\textbf{G}_2^{-1}v)^\top&1\end{bmatrix}. \end{aligned}$$

It follows that the grand sum of \(\textbf{G}_3^{-1}\) is

$$\begin{aligned} \textbf{1}^\top \textbf{G}_3^{-1} \textbf{1}&=\textbf{1}^\top \textbf{G}_{2}^{-1}\textbf{1}+c \left( \textbf{1}^\top \begin{bmatrix}-\textbf{G}_2^{-1}v\\ 1 \end{bmatrix} \right) ^2. \end{aligned}$$
(8)

We now investigate he second term in (8). We know that \(\textbf{G}_3^{-1}\) is positive definite by Lemma 17. Since c is a principal submatrix of a positive definite matrix, c is positive definite by Lemma 15. It follows that \(c \ge 1\) with equality if and only if \(v=\textbf{0}.\) Now we consider three cases. If \(-G_2^{-1}v=\textbf{0},\) this means that \(v_1+v_2=0.\) If \(v_1=v_2=0,\) then

$$\begin{aligned} c \left( \textbf{1}^\top \begin{bmatrix}-\textbf{G}_2^{-1}v\\ 1 \end{bmatrix} \right) ^2=1. \end{aligned}$$

If \(v_1+v_2=0\) and \(v_1=-v_2\ne 0,\) then we get \(c>1\) and so

$$\begin{aligned}c \left( \textbf{1}^\top \begin{bmatrix}-\textbf{G}_2^{-1}v\\ 1 \end{bmatrix}\right) ^2>1. \end{aligned}$$

Lastly, we show that \(-\textbf{G}_2^{-1}v<0\) is not possible. Suppose \(-\textbf{G}_2^{-1}v<0\). Then \(-\textbf{G}_2^{-1}(-v)>0.\) Therefore, the basis formed with \(\mathbb {B}_2^3\) and \(-\mathbb {B}_1^3,\) say \({\widetilde{\mathbb {B}}}_3\), has a grand sum \(\textbf{1}^\top \textbf{G}({\widetilde{\mathbb {B}}}_3)^{-1} \textbf{1}\) strictly greater than \(\textbf{1}^\top \textbf{G}(\mathbb {B}_3)^{-1} \textbf{1}.\) This is a contradiction to the assumption that \(\textbf{1}^\top \textbf{G}(\mathbb {B}_3)^{-1} \textbf{1}\) is the maximum for all possible bases of \(\mathbb {R}^3\) contained in \(\mathbb {D}_{3,5}\) since it is in \(\textbf{A}(\mathbb {D}_{3,5}).\) Therefore, we must have \(-\textbf{G}_2^{-1}v>0\) and it follows that

$$\begin{aligned} c \left( \textbf{1}^\top \begin{bmatrix}-\textbf{G}_2^{-1}v\\ 1 \end{bmatrix}\right) ^2>1. \end{aligned}$$

Therefore, the second term in (8) is minimal and equal to 1 if and only if \(v=\textbf{0}.\) \(\square\)

Proposition 30

(Orthogonality of the subspaces) Let \(\mathbb {D}_{3,5}= \mathring{\mathbb {D}}^3_{1} \cup \mathbb {D}^3_{2}\) be a positive basis of size 5 in \(\mathbb {R}^3\) where \(\mathring{\mathbb {D}}^3_{1}\) is a subpositive basis of the subspace \(L_1\) and \(\mathbb {D}^3_2\) is a subpositive basis of the subspace \(L_2,\) \(L_1 \oplus L_2=\mathbb {R}^3\) such that \(L_1 \cap L_2 =\{\textbf{0}\}.\) If \(\mathbb {D}_{3,5}\) is optimal over \(\varOmega _{3,5}\), then \(L_1 \perp L_2\).

Proof

Suppose \(\mathbb {D}_{3,5}\) is optimal and that the two subspaces are not orthogonal to each other. Let \(\mathbb {B}_3\) be a basis of \(\mathbb {R}^3\) in \(\textbf{A}(\mathbb {D}_{3,5})\) (Proposition 11 guarantees the existence of this basis). We know that \(\mathbb {B}_3\) admits a partition

$$\begin{aligned} \mathbb {B}_3=\mathbb {B}^3_2 \cup \mathbb {B}^3_1, \end{aligned}$$

where \(\mathbb {B}_2^3\) is contained in \(\mathbb {D}_2^3\) and \(\mathbb {B}_1^3\) is contained in \(\mathring{\mathbb {D}}_1^3.\) By Lemma 29, we conclude that the only possible way that \(\mathbb {D}_{3,5}\) is optimal is to have \(\textbf{1}^\top \textbf{G}(\mathbb {B}_2^3)^{-1} \textbf{1}\) strictly less than the best value for a positive basis where both subspaces are orthogonal, since orthogonality of the subspaces decreases the grand sum \(\textbf{1}^\top \textbf{G}(\mathbb {B}_3)^{-1} \textbf{1}\) for a fix value of \(\textbf{1}^\top \textbf{G}(\mathbb {B}_2^3)^{-1} \textbf{1}\). We now show that it is not possible to obtain a value of \(\textbf{1}^\top \textbf{G}(\mathbb {B}_2^3)^{-1} \textbf{1}\) strictly less than the value obtain when \(\mathbb {B}^3_2\) is picked from an optimal subpositive basis \(\mathring{\mathbb {D}}^3_2,\) which is \(2^2=4.\) Suppose that \(\textbf{1}^\top \textbf{G}(\mathbb {B}_2^3)^{-1}\textbf{1}<4.\) This means that there exists a subbasis of \(L_2\) contained in \(\mathbb {D}^3_2\), say \({\widetilde{\mathbb {B}}}^3_2,\) such that

$$\begin{aligned} \textbf{1}^\top \textbf{G}({\widetilde{\mathbb {B}}}^3_2)^{-1} \textbf{1}>4>\textbf{1}^\top \textbf{G}(\mathbb {B}_2^3)^{-1} \textbf{1}. \end{aligned}$$

Form \({\widetilde{\mathbb {B}}}_3\) by choosing \({\widetilde{\mathbb {B}}}^3_2\) and a vector d contained in \(\mathring{\mathbb {D}}^3_1\) such that

$$\begin{aligned} c \left( \textbf{1}^\top \begin{bmatrix}-\textbf{G}({\widetilde{\mathbb {B}}}_2^3)^{-1}v\\ 1 \end{bmatrix} \right) ^2>1, \end{aligned}$$

where \(v=({\widetilde{\mathbb {B}}}_2^3)^\top d \in \mathbb {R}^2.\) Since \(\mathbb {B}_3\) is in \(\textbf{A}(\mathbb {D}_{3,5}),\) it maximizes the grand sum \(\textbf{1}^\top \textbf{G}(\cdot )^{-1} \textbf{1}\) for all positive bases of \(\mathbb {R}^3\) contained in \(\mathbb {D}_{3,5}.\) Hence,

$$\begin{aligned} \textbf{1}^\top \textbf{G}({\widetilde{\mathbb {B}}}_3) \textbf{1}&\le \textbf{1}^\top \textbf{G}(\mathbb {B}_3)^{-1} \textbf{1}. \end{aligned}$$

Let \(\mathbb {D}'_{3,5}={{\,\textrm{Diag}\,}}(\mathring{\mathbb {D}}^3_2,\mathring{\mathbb {D}}^3_1)\) and \(\mathbb {B}'_3 \in \textbf{A}(\mathbb {D}'_{3,5})\). Since all terms in (8) for \(\textbf{1}^\top \textbf{G}(\mathbb {B}'_3)^{-1} \textbf{1}\) are strictly less than all corresponding terms in (8) for \(\textbf{1}^\top \textbf{G}({\widetilde{\mathbb {B}}}_3)^{-1} \textbf{1},\) we obtain

$$\begin{aligned} \textbf{1}^\top \textbf{G}(\mathbb {B}'_3)^{-1} \textbf{1}< \textbf{1}^\top \textbf{G}({\widetilde{\mathbb {B}}}_3)^{-1} \textbf{1}\le \textbf{1}^\top \textbf{G}(\mathbb {B}_3)^{-1} \textbf{1}. \end{aligned}$$

By Proposition 28, this means that \({{\,\textrm{cm}\,}}(\mathbb {D}'_{3,5})>{{\,\textrm{cm}\,}}(\mathbb {D}_{3,5}).\) This is a contradiction to the assumption that \(\mathbb {D}_{3,5}\) is optimal.

Therefore, if \(\mathbb {D}_{3,5}\) is optimal, then \(L_1\perp L_2\). \(\square\)

Theorem 31

Let \(\mathbb {D}_{3,5}={{\,\textrm{Diag}\,}}\left( \mathring{\mathbb {D}}_2, \mathring{\mathbb {D}}_1 \right) .\) Then \(\mathbb {D}_{3,5}\) is optimal over \(\varOmega _{3,5}.\)

Proof

Let \(\mathbb {D}'_{3,5}=\mathbb {D}^3_2 \cup \mathring{\mathbb {D}}^3_1\) be an optimal positive basis over \(\varOmega _{3,5}\) where \(\mathbb {D}_2^3\) is a subpositive basis of the subspace \(L_2\) and \(\mathbb {D}^3_1\) is a subpositive basis of the subspace \(L_1\) in \(\mathbb {R}^3\). By Proposition 30, \((\mathbb {D}^3_2)^\top \mathbb {D}^3_1=\textbf{0}\in \mathbb {R}^3.\) Let \(\mathbb {B}_3=\mathbb {B}_2^3 \cup \mathbb {B}_1^3\) be a basis of \(\mathbb {R}^3\) in \(\textbf{A}(\mathbb {D}'_{3,5}).\) Realigning the positive basis \(\mathbb {D}'_{3,5}\) if necessary, the Gram matrix of \(\mathbb {B}_3\) is

$$\begin{aligned} \textbf{G}(\mathbb {B}_3)={{\,\textrm{Diag}\,}}(\textbf{G}(\mathbb {B}_2), 1), \end{aligned}$$

where \(\mathbb {B}_2\) is a basis of \(\mathbb {R}^2.\) Then \(\textbf{G}(\mathbb {B}_3)^{-1}={{\,\textrm{Diag}\,}}(\textbf{G}(\mathbb {B}_2)^{-1}, 1)\) and the cosine measure is given by

$$\begin{aligned} {{\,\textrm{cm}\,}}(\mathbb {D}'_{3,5})=\frac{1}{\sqrt{\textbf{1}^\top \textbf{G}(\mathbb {B}_2)^{-1} \textbf{1}+ 1}}. \end{aligned}$$

The minimal value of \(\textbf{1}^\top \textbf{G}(\mathbb {B}_2)^{-1}\textbf{1}\) is obtained if and only if \(\mathbb {B}_2\) is picked from an optimal subpositive basis \(\mathring{\mathbb {D}}^3_2\) of \(\mathbb {R}^2.\) Hence, \(\mathbb {D}_2^3=\mathring{\mathbb {D}}_2^3\) and we get that \({{\,\textrm{cm}\,}}(\mathbb {D}'_{3,5})={{\,\textrm{cm}\,}}(\mathbb {D}_{3,5}).\) Therefore, \(\mathbb {D}_{3,5}\) is optimal. \(\square\)

The following figure illustrates an optimal positive basis of \(\mathbb {R}^3\) over \(\varOmega _{3,s}\) for each possible size (\(s=4,5,6\)). Note that \(\mathring{\mathbb {D}}_3\) and \(\mathring{\mathbb {D}}_{3,6}\) are also optimal over \(\mathcal {P}_{3,s}\), since \(\varOmega _{3,s}=\mathcal {P}_{3,s}\) whenever \(s \in \{n+1, 2n\}\) (Fig. 1).

Fig. 1
figure 1

An optimal positive basis of \(\mathbb {R}^3\) over \(\varOmega _{3,s}\) for each possible size s

It is still unclear if \(\mathbb {D}_{3,5}={{\,\textrm{Diag}\,}}(\mathring{\mathbb {D}}_2,\mathring{\mathbb {D}}_1 )\) is optimal over \(\mathcal {P}_{3,5}.\) To prove that, it must be shown that there exists no positive basis of \(\mathbb {R}^3\) with five vectors that admits a partition where not all the critical vectors are equal to zero that provides a greater cosine measure than \({{\,\textrm{cm}\,}}(\mathbb {D}_{3,5}).\) We have conducted a numerical experiment and the results suggest that \(\mathbb {D}_{3,5}\) is optimal over \(\mathcal {P}_{3,5},\) but no rigorous proof has been done yet. This topic is an obvious future research question to explore.

The next section investigates optimality of a positive basis in a general space \(\mathbb {R}^n.\)

3.2 Optimality in \(\mathbb {R}^n\)

In the previous section, we showed that the two subspaces of \(\mathbb {R}^3\) must be orthogonal for a positive basis of size five to be optimal over \(\varOmega _{3,s}.\) The proof is relatively easy, since one of the Gram matrices of a subbasis is simply a scalar. This is not necessarily the case when considering a positive basis in higher dimensions. It is still an open question to determine if all the subspaces must be pairwise orthogonal for a positive basis of \(\mathbb {R}^n\) to be optimal over \(\varOmega _{n,s}\) and if all the critical vectors must be zero for a positive basis of \(\mathbb {R}^n\) to be optimal over \(\mathcal {P}_{n,s}.\) Both of these questions have been answered when \(s=2n.\) Indeed, all the subspaces are pairwise orthogonal and all critical vectors are zero in a maximal positive basis. It seems reasonable to believe that this is also the case for intermediate positive bases. However, a rigorous analysis determining whether this is true has yet to be completed.

In the sequel, we restrict ourselves to a proper subset of \(\varOmega _{n,s}\) that we name orthogonally structured positive bases and denote \(\varOmega ^+_{n,s}\). We investigate the properties of an optimal positive basis over \(\varOmega ^+_{n,s}.\) This is an important step toward eventually finding a positive basis of intermediate size over \(\mathcal {P}_{n,s}.\) We also see that an optimal positive basis over \(\varOmega ^+_{n,s}\) has a nice structure that makes it easy to generate on a computer.

Definition 32

(Orthogonally structured positive basis, \(\varOmega ^+_{n,s}\)) Let \(\mathbb {D}_{n,s}\) be a positive basis in \(\mathbb {R}^n.\) We say that \(\mathbb {D}_{n,s}\) is orthogonally structured if it is in \(\varOmega _{n,s}\) and all subpositive bases \(\mathbb {D}^n_{m_i}\) in a partition of \(\mathbb {D}_{n,s}\) are pairwise orthogonal whenever \(i \ge 2\). That is, \((\mathbb {D}^n_{m_i})^\top \mathbb {D}^n_{m_j}=\textbf{0}\) for all \(i \ne j, i,j \in \{1, \dots ,, s-n\}\) whenever \(s-n \ge 2.\) We denote the set of all orthogonally structure positive bases by \(\varOmega ^+_{n,s}\).

Notice that when \(n+1<s<2n,\) we have \(\varOmega ^+_{n,s} \subset \varOmega _{n,s} \subset \mathcal {P}_{n,s}.\) When \(s=n+1\), we have \(\varOmega ^+_{n,n+1}=\varOmega _{n,n+1}=\mathcal {P}_{n,n+1}.\) When \(s=2n\), we have \(\varOmega ^+_{n,2n}\subset \varOmega _{n,2n}=\mathcal {P}_{n,2n}.\)

Theorem 33 presents two sufficient conditions for an orthogonally structured positive basis to be optimal over \(\varOmega ^+_{n,s}\). The notation \({{\,\textrm{rem}\,}}(\frac{a}{b})\) is used to denote the remainder of the division a/b,  where b is nonzero. Also, the notation \(\vert I \vert ,\) where I is a finite index set, is used to represent the number of elements in I.

Theorem 33

Let \(\mathbb {D}_{n,s}\) be a positive basis of \(\mathbb {R}^n\) in \(\varOmega ^+_{n,s}.\) If the following two properties are satisfied, then \(\mathbb {D}_{n,s}\) is optimal over \(\varOmega ^+_{n,s}\).

  1. (i)

    All the minimal subpositive bases \(\mathbb {D}^n_{m_i}\) involved in a partition of \(\mathbb {D}_{n,s}\) are optimal.

  2. (ii)

    The dimensions \(m_i\) of the subpositive bases \(\mathbb {D}^n_{m_i}\) satisfy

    $$\begin{aligned}&m_j= \left\lfloor \frac{n}{s-n}\right\rfloor , \quad j \in J,{} & {} m_k=\left\lceil \frac{n}{s-n}\right\rceil , \quad k \in K, \end{aligned}$$

    where J and K are disjoint index sets such that

    $$\begin{aligned}&J \cup K=\{1, 2, \dots , s-n\},{} & {} \vert J \vert = s-n-{{\,\textrm{rem}\,}}\left( \frac{n}{s-n} \right) ,{} & {} {}&\vert K \vert ={{\,\textrm{rem}\,}}\left( \frac{n}{s-n} \right) . \end{aligned}$$

Proof

Suppose that \(\mathbb {D}_{n,s}\) is a positive basis of \(\mathbb {R}^n\) in \(\varOmega ^+_{n,s}\) such that properties (i) and (ii) are satisfied and that \(\mathbb {D}_{n,s}\) is not optimal. This means that there exists an optimal positive basis of size s in \(\mathbb {R}^n,\) say \(\mathbb {D}'_{n,s},\) such that \({{\,\textrm{cm}\,}}(\mathbb {D}'_{n,s})> {{\,\textrm{cm}\,}}(\mathbb {D}_{n,s}).\) Let \(\mathbb {B}_n \in \textbf{A}(\mathbb {D}'_{n,s})\) (such a basis exists by Proposition 11). By Corollary 27, it follows that \(\mathbb {B}_n\) admits the partition

$$\begin{aligned} \mathbb {B}_n=\mathbb {B}^n_{m_1} \cup \mathbb {B}^n_{m_{2}} \cup \dots \cup \mathbb {B}^n_{m_{s-n}} \end{aligned}$$

where \(\mathbb {B}^n_{m_i} \in \mathbb {R}^{n \times m_i}\) is a subbasis of the subspace \(L_i\) of \(\mathbb {R}^n\) for all \(i \in \{1, \dots , s-n\}.\) We know that \(\mathbb {B}^n_{m_i} \subset \mathbb {D}^n_{m_i}\) where \(\mathbb {D}^n_{m_i}\) is a minimal subpositive basis of \(L_i\) for all \(i \in \{1, \dots , s-n\}.\) Since \(\mathbb {D}'_{n,s}\) is in \(\varOmega ^+_{n,s},\) all the subspaces \(L_i\) are orthogonal to each other. Hence, the Gram matrix of \(\mathbb {B}_n\) is

$$\begin{aligned} \textbf{G}(\mathbb {B}_n)&={{\,\textrm{Diag}\,}}( \textbf{G}(\mathbb {B}^n_{m_1}), \dots , \textbf{G}(\mathbb {B}^n_{m_{s-n}})). \end{aligned}$$

Then \(\textbf{G}(\mathbb {B}_n)^{-1}={{\,\textrm{Diag}\,}}(\textbf{G}(\mathbb {B}^n_{m_1})^{-1}, \dots , \textbf{G}(\mathbb {B}^n_{m_{s-n}})^{-1})\) and the cosine measure of \(\mathbb {D}'_{n,s}\) is given by

$$\begin{aligned} {{\,\textrm{cm}\,}}(\mathbb {D}'_{n,s})&=\frac{1}{\sqrt{\sum _{i=1}^{s-n}\textbf{1}^\top \textbf{G}(\mathbb {B}^n_{m_i})^{-1} \textbf{1}}}. \end{aligned}$$

Since \(\mathbb {D}'_{n,s}\) is optimal, we have that \(\sum _{i=1}^{s-n} \textbf{1}^\top \textbf{G}(\mathbb {B}^n_{m_i})^{-1} \textbf{1}\) is minimal. Hence, we must have that each \(\mathbb {B}^n_{m_i}\) is contained in an optimal minimal subpositive basis \(\mathring{\mathbb {D}}^n_{m_i}.\) So the sum in the previous equation is equal to

$$\begin{aligned} \sum _{i=1}^{s-n} \textbf{1}^\top \textbf{G}(\mathbb {B}^n_{m_i})^{-1} \textbf{1}&=\sum _{i=1}^{s-n} m_i^2. \end{aligned}$$

The minimal possible value of \(\sum _{i=1}^{s-n}m_i^2\) is obtained by solving the following optimization problem:

$$\begin{aligned} \min&\sum _{i=1}^{s-n} m_i^2 \quad \mathrm subject\, to\sum _{i=1}^{s-n} m_i=n, \quad m_i \in \mathbb {N}. \end{aligned}$$

The integer solution is given by

$$\begin{aligned}&m_j= \left\lfloor \frac{n}{s-n}\right\rfloor , \quad j \in J,{} & {} m_k=\left\lceil \frac{n}{s-n}\right\rceil , \quad k \in K, \end{aligned}$$

where J and K are disjoint index sets such that

$$\begin{aligned}&J \cup K=\{1, 2, \dots , s-n\},{} & {} \vert J \vert = s-n-{{\,\textrm{rem}\,}}\left( \frac{n}{s-n} \right) ,{} & {} {}&\vert K \vert ={{\,\textrm{rem}\,}}\left( \frac{n}{s-n} \right) . \end{aligned}$$

But then we obtain \({{\,\textrm{cm}\,}}(\mathbb {D}_{n,s})={{\,\textrm{cm}\,}}(\mathbb {D}'_{n,s})\), a contradiction. Therefore, a positive basis of \(\mathbb {R}^n\) satisfying (i) and (ii) must be optimal over \(\varOmega ^+_{n,s}.\) \(\square\)

Corollary 34

(The cosine measure of an optimal orthogonally structured positive basis) Let \(\mathbb {D}_{n,s}\) be an optimal positive basis over \(\varOmega ^+_{n,s}.\) Let \(\texttt{r}={{\,\textrm{rem}\,}}\left( \frac{n}{s-n}\right) .\) Then

$$\begin{aligned} {{\,\textrm{cm}\,}}(\mathbb {D}_{n,s})&=\frac{1}{\sqrt{(s-n-\texttt{r})\left\lfloor \frac{n}{s-n}\right\rfloor ^2+\texttt{r}\left\lceil \frac{n}{s-n}\right\rceil ^2}}. \end{aligned}$$

In particular, when \(\mathring{\mathbb {D}}_{n}\) is an optimal minimal positive basis over \(\varOmega ^+_{n,n+1}(=\mathcal {P}_{n,n+1})\), we obtain

$$\begin{aligned} {{\,\textrm{cm}\,}}({\mathring{\mathbb {D}}_n})=\frac{1}{n}. \end{aligned}$$

This agrees with the value of the cosine measure provided in [20, Theorem 1] for a minimal positive basis to be optimal over \(\mathcal {P}_{n,n+1}\). When \(\mathbb {D}_{n,2n}\) is an optimal positive basis over \(\varOmega ^+_{n,2n},\) we obtain

$$\begin{aligned} {{\,\textrm{cm}\,}}(\mathbb {D}_{n,2n})= \frac{1}{\sqrt{n}}. \end{aligned}$$

Once again, this value agrees with the value provided in [20, Theorem 2] for a maximal positive basis to be optimal over \(\mathcal {P}_{n,2n}.\) Hence, for both minimal and maximal positive bases to be optimal over \(\mathcal {P}_{n,s},\) it is necessary that they are contained in \(\varOmega ^+_{n,s}.\) This provides an argument to believe that this is also the case for intermediate positive bases. However, two facts remain to be proved in \(\mathbb {R}^n\) before concluding that it is the case.

The following table provides the diagonal blocks contained in an optimal (over \(\varOmega ^+_{n,s}\)) positive basis of \(\mathbb {R}^n\) of the form \(\mathbb {D}_{n,s}={{\,\textrm{Diag}\,}}(\mathring{\mathbb {D}}_{m_1}, \dots , \mathring{\mathbb {D}}_{m_{s-n}}).\) The notation \((\mathring{\mathbb {D}}_{m_i})^k\) where k is a positive integer means that the diagonal block \(\mathring{\mathbb {D}}_{m_i}\) appears k times as a diagonal entry in \(\mathbb {D}_{n,s}\) (Table 2).

Table 2 The diagonal blocks in an optimal (over \(\varOmega ^+_{n,s}\)) positive basis \(\mathbb {D}_{n,s}={{\,\textrm{Diag}\,}}(\mathring{\mathbb {D}}_{m_1}, \dots , \mathring{\mathbb {D}}_{m_{s-n}})\)

A MATLAB code is available upon request to generate an optimal orthogonally structured positive basis of any dimension n and size s. Note that each minimal subpositive basis may be realigned in its respective subspace to include a specific vector of the subspace. The whole positive basis may also be realigned to include a specific vector of \(\mathbb {R}^n.\) These realignments do not affect the value of the cosine measure, as they can be done by multiplying \(\mathbb {D}_{n,s}\) with an orthonormal matrix. A method to accomplish these realignments is provided in [14].

4 Conclusion

We have investigated the structure of intermediate positive bases in \(\mathbb {R}^n\). Using results from Romanowicz, we demonstrated that any positive basis, \(\mathbb {D}_{n,s}\), of \(\mathbb {R}^n\) can be partitioned into \(s-n\) minimal subpositive bases plus a critical vector. In this paper, we have focused on \(\varOmega _{n,s}\), the set of positive bases that can be written as a partition in which all critical vectors are zero. We have shown that the algorithm developed in [12] to compute the cosine measure can be simplified for any positive basis contained in \(\varOmega _{n,s}\) (Proposition 28). When \(\mathbb {D}_{n,s}\) is a positive basis contained in \(\varOmega _{n,s},\) the number of bases of \(\mathbb {R}^n\) contained in \(\mathbb {D}_{n,s}\) has been identified (5). We have provided the structure of an optimal positive basis of intermediate size over \(\varOmega _{3,5},\) \(\mathbb {D}_{3,5}\), and proved that the two subspaces must be orthogonal to each other. We conjecture that this result also holds in \(\mathbb {R}^n\). In reviewing this result, note that the key requirement would be to extend Lemma 18 to include a broader class of positive bases.

Following this conjecture, we focused on orthogonally structured positive bases, i.e., positive bases that can be written as a partition in which all critical vectors are zero and all subbases are orthogonal. We have determined a characterization of the structure of an optimal positive basis of this type (Theorem 33) and therefore determined the optimal cosine measure for orthogonally structured positive bases. It turns out that it is very simple and efficient to generate such a positive basis with software such as MATLAB.

In order to characterize optimality over the whole universe \(\mathcal {P}_{n,s}\) for positive bases of intermediate size completely, two questions need to be answered. First, must all critical vectors in a partition of an optimal positive basis be zero? Second, must all subspaces involved in a partition of an optimal positive basis be orthogonal? We conjecture that the answer to both questions is yes and will further examine this in future research.